Intro to the Arduino Topics: The Arduino Digital IO Analog IO Serial Communication.

Slides:



Advertisements
Presentasi serupa
DIFERENSIASI. Different = Berbeda Divergen = mencari hal BERBEDA dari suatu hal yang SAMA.
Advertisements

Learning Medium School : SMPN 1 Gotham City Subject : English
PERSAMAAN DIFERENSIAL (DIFFERENTIAL EQUATION)
CONCURENCY CONTROL DISTRIBUTED DATABASE. M AIN TOPICS Transaction managements Centralized database Distributed database Consistency control Centralized.
Lecture 5 Nonblocking I/O and Multiplexing Erick Pranata © Sekolah Tinggi Teknik Surabaya 1.
Kuliah Mikrokontroler AVR Komunikasi Serial - USART AVR ATmega16
Game Theory Purdianta, ST., MT..
MATERIAL RESOURCE PLANNING
1 DATA STRUCTURE “ STACK” SHINTA P STMIK MDP APRIL 2011.
1 Pertemuan 10: Know more about AIDS Matakuliah: G0942/Listening 1 Tahun: 2005 Versi: baru.
BLACK BOX TESTING.
Research Design (Cont). Jenis Perancangan Riset Jenis perancangan mana yg akan digunakan ? Peneliti perlu memikirkan tentang apa yang mereka inginkan.
Testing Implementasi Sistem Oleh :Rifiana Arief, SKom, MMSI
Menulis Kolom  Kolom adalah opini atau artikel. Tidak seperti editorial, kolom memiliki byline.  Kolom Biasanya ditulis reguler. Biasanya mingguan atau.
Organisasi dan arsitektur komputer
PART 5 TRAINING INPUT. Input 1 = Mikrokontroler menerima Input berupa tegangan (+) Input 0 = Mikrokontroler menerima Input berupa tegangan (–) ataupun.
ARDUINO UNO Umar Muhammad, ST.
HAMPIRAN NUMERIK SOLUSI PERSAMAAN NIRLANJAR Pertemuan 3
1 Pertemuan 5 Komunikasi antar Proses / Interprocess Communication (IPC) Matakuliah: T0316/sistem Operasi Tahun: 2005 Versi/Revisi: 5 OFFCLASS01.
9.3 Geometric Sequences and Series. Objective To find specified terms and the common ratio in a geometric sequence. To find the partial sum of a geometric.
Network Design (IP Address dan Subnetting). Tujuan Mengenal IP Address, bisa mengidentifikasinya dan bisa menggunakannya dalam membangun jaringan. Bisa.
-Do you have a close friend? Does she/he have a problem? -What do you say when she/he tells her/his problem? - Did you ever come to your friend house?
IP Addressing Laboratorium Teknik Informatika Universitas Gunadarma Stefanus Vlado Adi Kristanto Version 1.4.
The following short quiz consists of 4 questions and tells whether you are qualified to be a "professional". The questions are not that difficult, so.
Dissolved Oxygen The Good Gas. Photosynthesis: Your one-stop shop for all of your oxygen needs! Carbon Dioxide (from air) Water (from ground) Oxygen (to.
Jaringan Nirkabel Bab #5 – Enkoding Sinyal.
Jartel, Sukiswo Sukiswo
KOMUNIKASI DATA Materi Pertemuan 8.
KOMUNIKASI DATA Materi Pertemuan 9.
Kompetensi Umum Mahasiswa memahami definisi sensor dan aktuator
KOMUNIKASI DATA Materi Pertemuan 4.
KOMUNIKASI DATA Materi Pertemuan 2.
Tutorial Menggunakan VBB
Kode Hamming.
KOMUNIKASI DATA S. Indriani L, M.T
PROSES DAN MANAJEMEN PROSES (1)
Dasar-Dasar Pemrograman
CA113 Pengantar Manajemen Bisnis
Pertemuan <<18>> << Penemuan Fakta(01) >>
Pemrograman Berorientasi Objek
Pertemuan VI MAPPING FUNCTION.
Interpersonal Skill.
REAL NUMBERS EKSPONENT NUMBERS.
CA113 Pengantar Manajemen Bisnis
Arduino D3 Telekomunikasi.
SoftWare Arduino Umar muhammad, ST.
Pengantar Teknologi Informasi Introduction to Computers and Networks
Teknik Modulasi Pertemuan 07
Master data Management
PART 3 PENGENALAN HARDWARE
How Can I Be A Driver of The Month as I Am Working for Uber?
Things You Need to Know Before Running on the Beach.
CA113 Pengantar Manajemen Bisnis
Lesson 2-1 Conditional Statements 1 Lesson 2-1 Conditional Statements.
HughesNet was founded in 1971 and it is headquartered in Germantown, Maryland. It is a provider of satellite-based communications services. Hughesnet.
 Zoho Mail offers easy options to migrate data from G Suite or Gmail accounts. All s, contacts, and calendar or other important data can be imported.
Fix problems opening Norton  Fix problems opening Norton This problem can happen after you update Norton. To fix the matter, restart the computer. Fix.
CALL PC EXPERT How to Remove Adware, Pop- up Ads from Web Browser.
Human Body Systems and Homeostasis Human Body Systems & Homeostasis.
SIMILES. The comparison is carried out using the words ‘like’ as etc. Example : 1. as free as a bird. The word ‘free’ is compared with the word ‘bird’
By Yulius Suprianto Macroeconomics | 02 Maret 2019 Chapter-5: The Standard of Living Over Time and A Cross Countries Source: http//
Right, indonesia is a wonderful country who rich in power energy not only in term of number but also diversity. Energy needs in indonesia are increasingly.
 This application will helps you to improve your speaking skills in English. It improve your communication skill in daily communication, travel, shopping,
Kelompok 13 Nama Anggota : Sigit Dwi Prianto Praditya F Marliyana.
2. Discussion TASK 1. WORK IN PAIRS Ask your partner. Then, in turn your friend asks you A. what kinds of product are there? B. why do people want to.
HOW TO IMPROVE YOUR PUBLIC SPEAKING SKILLS. 2 3 INIKAH YANG SERING ANDA ALAMI SAAT PRESENTASI?
ARDUINO UNO. Apa itu mikrocontroller ? Mengenal mikrokontroler Arduino UNO Joobsheet ini dimaksudkan agar Anda yang masih pemula dalam dunia mikrokontroller.
Transcript presentasi:

Intro to the Arduino Topics: The Arduino Digital IO Analog IO Serial Communication

Topic 1: Meet Arduino Uno

Getting Started Check out: 1.Download & install the Arduino environment (IDE) (not needed in lab) 2.Connect the board to your computer via the USB cable 3.If needed, install the drivers (not needed in lab) 4.Launch the Arduino IDE 5.Select your board 6.Select your serial port 7.Open the blink example 8.Upload the program

Arduino IDE See: for more informationhttp://arduino.cc/en/Guide/Environment

Select Serial Port and Board

todbot.com/blog/bionicarduino

Input/Output Image from Theory and Practice of Tangible User Interfaces at UC Berkley

Topic 2: Digital Input/Output Digital IO is binary valued—it’s either on or off, 1 or 0 Internally, all microprocessors are digital, why? 1 0

Arduino Digital I/0 pinMode(pin, mode) Sets pin to either INPUT or OUTPUT digitalRead(pin) Reads HIGH or LOW from a pin digitalWrite(pin, value) Writes HIGH or LOW to a pin Electronic stuff Output pins can provide 40 mA of current Writing HIGH to an input pin installs a 20K Ω pullup

Our First Program

IO Pins Image from Theory and Practice of Tangible User Interfaces at UC Berkley

In-class Exercise 1: Digital IO Use a push-button to turn ON/Off LED

Topic 3: Analog Input Think about music stored on a CD---an analog signal captured on digital media –Sample rate –Word length

Resolution: the number of different voltage levels (i.e., states) used to discretize an input signal Resolution values range from 256 states (8 bits) to 4,294,967,296 states (32 bits) The Arduino uses 1024 states (10 bits) Smallest measurable voltage change is 5V/1024 or 4.8 mV Maximum sample rate is 10,000 times a second Arduino Analog Input Image credit: Tod Kurt

How does ADC work? How does ADC work Excel Demonstration

Can a digital devise produce analog output? Topic 3: Analog Output Analog output can be simulated using pulse width modulation (PWM) Image from Theory and Practice of Tangible User Interfaces at UC Berkley

Pulse Width Modulation Can’t use digital pins to directly supply say 2.5V, but can pulse the output on and off really fast to produce the same effect The on-off pulsing happens so quickly, the connected output device “sees” the result as a reduction in the voltage Image from Theory and Practice of Tangible User Interfaces at UC Berkley

PWM Duty Cycle Fixed cycle length; constant number of cycles/sec Image credit: Tod Kurt output voltage = (on_time / cycle_time) * 5V

PMW Pins Command: analogWrite(pin,value) value is duty cycle: between 0 and 255 Examples: analogWrite(9, 128) for a 50% duty cycle analogWrite(11, 64) for a 25% duty cycle Image from Theory and Practice of Tangible User Interfaces at UC Berkley

In-class Exercise 2: Analog IO A light theremin Part 1:

In-class Exercise 2: Analog IO Add a 330 ohm resistor and an LED to pin 9 Using the analogWrite() command, set the intensity of the LED as a function of the value of prReading Part 2: Add an LED

Topic 4: Serial Communication Image from

todbot.com/blog/bionicarduino

Serial Communication Compiling turns your program into binary data (ones and zeros) Uploading sends the bits through USB cable to the Arduino The two LEDs near the USB connector blink when data is transmitted RX blinks when the Arduino is receiving data TX blinks when the Arduino is transmitting data todbot.com/blog/bionicarduino

Open the Serial Monitor and Upload the Program

Some Commands Serial.begin() - e.g., Serial.begin(9600) Serial.print() or Serial.println() - e.g., Serial.print(value) Serial.read() Serial.available() Serial.write() Serial.parseInt() Example Program

Serial-to-USB chip---what does it do? Image from Theory and Practice of Tangible User Interfaces at UC Berkley The LilyPad and Fio Arduino require an external USB to TTY connector, such as an FTDI “cable”. In the Arduino Leonardo a single microcontroller runs the Arduino programs and handles the USB connection.

Two different communication protocols Serial (TTL): Image from

USB Protocol Much more complicated Image from

In-class Exercise 3: Serial Communication Modify your program from in-class exercise 2-part 2 to control the intensity of the LED attached to pin 9 based on keyboard input. Use the Serial.parseInt() method to read numeric keyboard input as an integer.Serial.parseInt() An input of 9 should produce full intensity and an input of 0 should turn the LED off.