SlideShare a Scribd company logo
1 of 15
Download to read offline
Introduction to
Arduino/Genuino Uno
By: Yeo Kheng Meng (yeokm1@gmail.com)
https://github.com/SustainableLivingLab/intro-to-arduinoStartathon (20 Feb 2016) 1
Components/Software check
• Laptop loaded with Arduino IDE
• Whole Hackpack or at least
• Arduino Uno
• Breadboard
• USB cable
• LED
• Button
• 220 ohm resistor
• 10k ohm resistor
• At least a few jumper wires
Why the 2 names?
• Different branding
• Arduino (sold in USA)
• Genuino (sold everywhere else)
• Some disagreements between the founders
• Uno boards from both brands are otherwise identical
First some electronic basics
Digital Logic Levels
• Logic HIGH = True = ON = +5V / +3.3V
• Logic LOW = False = OFF = 0V
• +5V for Arduino Uno
• +3.3V may be used by other devices
Analog signal
• Analog signals are smooth and continuous
• Can be positive and/or negative or both
• Signals will be converted by analog-to-digital converter (ADC)
in Arduino before use
• Arduino’s resolution is 10bits: 210 = 1024
• Range: 0 – 5V >>>> 0 – 1024
𝑅𝑒𝑠𝑢𝑙𝑡 =
𝑆𝑜𝑢𝑟𝑐𝑒 𝑉𝑜𝑙𝑡𝑎𝑔𝑒
𝑀𝑎𝑥 𝐿𝑜𝑔𝑖𝑐 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (5𝑉)
∗ 1024
Breadboard
• Your main prototyping component
• Continuous lines indicate those holes are connected
together
• Horizontal usually for power
• Convention: Red for +, Black/Blue for -
• Vertical for your components
Now we come to the Arduino
• Programmable board
• Use program code to:
• Receive signal inputs from pins
• Control signal outputs of pins
Ex 1: Blink onboard LED
• Sanity check, verifies if working
• Arduino hardware
• Arduino IDE settings
• Arduino IDE settings
• Arduino board: Arduino/Gemuino Uno
• Port: Depends on your machine
• Click “Upload” button (2nd from left)
• Understand source code
• Onboard LED blinks at 1 second intervals
Exercise objectives:
1. Use an example
2. Understand Arduino
code format
3. Concept of pins
4. Output to pin
5. Upload code
Create new Arduino file
1. Create folder on desktop
2. File -> New
3. Name program filename same as folder name
• Example: myblinker.ino
Ex 2: Blink external LED
• 220ohm resistor is to prevent too much
current from flowing -> Damage LED
• Arduino IDE instructions
1. Copy-paste Blink example to your
new file
2. Change Pin number 13 > 12
Exercise objectives:
1. Basic wiring up of breadboard
2. Creating your own Arduino sketch
Ex 3: Button adjusts LED state
• We will now try to toggle the LED
whenever button is pressed
• 10k ohm pull-down resistor
• Ensures button pin is LOW when button is
not pressed -> Not floating
• Prevents short circuit when button is
pressed
• Execute the code in Ex3
• Does the LED toggle as expected?
• Why?
Exercise objectives:
1. Retrieving input
2. Prevent floating pin
3. If-else branching
Ex 4: Debouncing
• Now lets try some code to solve this problem
Exercise objectives:
1. Long datatype
2. Debouncing
3. millis() function
4. Use of &&
• Debouncing:
• Accept only one input within
certain time period
Ex 5: Blink LED 3x on button press
• Blink LED 3x with blink separation of 100ms
Exercise objectives:
1. For - loop
Ex 6: Serial Port Debugging
• Useful debugging tool
• Let’s print out something when button is pressed
• Print the steps.
• Good practice to print “Arduino Ready” at end of setup()
• Tools -> Serial Monitor
• Ensure baud rate eg. 9600 match what you place in code
Exercise objectives:
1. Print Data over Serial

More Related Content

What's hot

Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshopatuline
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduinoBetsy Eng
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the ArduinoCharles A B Jr
 
Arduino presentation by_warishusain
Arduino presentation by_warishusainArduino presentation by_warishusain
Arduino presentation by_warishusainstudent
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoYong Heui Cho
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATIONsoma saikiran
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoRichard Rixham
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoVishnu
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino MicrocontrollerShyam Mohan
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guidehandson28
 
arduino
 arduino arduino
arduinojhcid
 
Introduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotIntroduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotSachin S
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 

What's hot (20)

Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Lesson sample introduction to arduino
Lesson sample   introduction to arduinoLesson sample   introduction to arduino
Lesson sample introduction to arduino
 
Arduino course
Arduino courseArduino course
Arduino course
 
Introducing the Arduino
Introducing the ArduinoIntroducing the Arduino
Introducing the Arduino
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino presentation by_warishusain
Arduino presentation by_warishusainArduino presentation by_warishusain
Arduino presentation by_warishusain
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino
ArduinoArduino
Arduino
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Arduino Microcontroller
Arduino MicrocontrollerArduino Microcontroller
Arduino Microcontroller
 
Arduino
ArduinoArduino
Arduino
 
ESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started GuideESP32 WiFi & Bluetooth Module - Getting Started Guide
ESP32 WiFi & Bluetooth Module - Getting Started Guide
 
PPT ON Arduino
PPT ON Arduino PPT ON Arduino
PPT ON Arduino
 
arduino
 arduino arduino
arduino
 
Introduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to IotIntroduction to Arduino and Hands on to Iot
Introduction to Arduino and Hands on to Iot
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
Arduino
ArduinoArduino
Arduino
 

Viewers also liked

Arduino Model's
Arduino Model'sArduino Model's
Arduino Model'sAli Izmir
 
2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshoptrygvis
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307fauziahnurm
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Irfan Qadoos
 
5x7 matrix led display
5x7 matrix led display 5x7 matrix led display
5x7 matrix led display Vatsal N Shah
 
Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)TechLeap
 
Arduino technical session 1
Arduino technical session 1Arduino technical session 1
Arduino technical session 1Audiomas Soni
 
Moving message display
Moving message displayMoving message display
Moving message displayviraj1989
 
Rfid Presentation Slides
Rfid Presentation SlidesRfid Presentation Slides
Rfid Presentation Slidesguestbed1dd
 
Role of easy vr in Arduino Speech Processing
Role of easy vr in Arduino Speech ProcessingRole of easy vr in Arduino Speech Processing
Role of easy vr in Arduino Speech ProcessingMohammad Rehan Khan
 
Rfid ppt 8th sem
Rfid ppt 8th semRfid ppt 8th sem
Rfid ppt 8th semAmit Ranjan
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoEoin Brazil
 
Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full TutorialAkshay Sharma
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduinoAhmed Sakr
 

Viewers also liked (19)

Arduino Model's
Arduino Model'sArduino Model's
Arduino Model's
 
Catalogo unitronics 2012_intrave
Catalogo unitronics 2012_intraveCatalogo unitronics 2012_intrave
Catalogo unitronics 2012_intrave
 
8x8 dot matrix(project)
8x8 dot matrix(project)8x8 dot matrix(project)
8x8 dot matrix(project)
 
2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop
 
Arduino uno-schematic
Arduino uno-schematicArduino uno-schematic
Arduino uno-schematic
 
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307Automatic Lamp using Arduino UNO, LDR and RTC DS1307
Automatic Lamp using Arduino UNO, LDR and RTC DS1307
 
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
Temperature Sensor with LED matrix Display BY ►iRFAN QADOOS◄ 9
 
5x7 matrix led display
5x7 matrix led display 5x7 matrix led display
5x7 matrix led display
 
Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)Temperature sensor with a led matrix display (arduino controlled)
Temperature sensor with a led matrix display (arduino controlled)
 
Arduino technical session 1
Arduino technical session 1Arduino technical session 1
Arduino technical session 1
 
Moving message display
Moving message displayMoving message display
Moving message display
 
Rfid Presentation Slides
Rfid Presentation SlidesRfid Presentation Slides
Rfid Presentation Slides
 
Role of easy vr in Arduino Speech Processing
Role of easy vr in Arduino Speech ProcessingRole of easy vr in Arduino Speech Processing
Role of easy vr in Arduino Speech Processing
 
Arduino uno
Arduino unoArduino uno
Arduino uno
 
Rfid ppt 8th sem
Rfid ppt 8th semRfid ppt 8th sem
Rfid ppt 8th sem
 
Arduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the ArduinoArduino Lecture 1 - Introducing the Arduino
Arduino Lecture 1 - Introducing the Arduino
 
Arduino Full Tutorial
Arduino Full TutorialArduino Full Tutorial
Arduino Full Tutorial
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Rfid ppt
Rfid pptRfid ppt
Rfid ppt
 

Similar to Introduction to Arduino

Arduino spooky projects_class1
Arduino spooky projects_class1Arduino spooky projects_class1
Arduino spooky projects_class1Felipe Belarmino
 
aurduino-200107075953.pdf
aurduino-200107075953.pdfaurduino-200107075953.pdf
aurduino-200107075953.pdfHebaEng
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Pawan Dubey, PhD
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2Qtechknow
 
Aurdidino1 anurag preetirajesh-sgsits
Aurdidino1  anurag preetirajesh-sgsitsAurdidino1  anurag preetirajesh-sgsits
Aurdidino1 anurag preetirajesh-sgsitsanurag278
 
IOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdfIOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdfMayuRana1
 
Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1Afzal Ahmad
 
#startathon2.0 - Arduino
#startathon2.0 - Arduino#startathon2.0 - Arduino
#startathon2.0 - Arduinosl2square
 
Electronics Arduino Processors
Electronics Arduino ProcessorsElectronics Arduino Processors
Electronics Arduino ProcessorsLeopoldo Armesto
 
computer system Architecture (Food detector)
computer system Architecture (Food detector)computer system Architecture (Food detector)
computer system Architecture (Food detector)Mehul Boghra
 
295889096 music-reactive-multicolor-led-lights
295889096 music-reactive-multicolor-led-lights295889096 music-reactive-multicolor-led-lights
295889096 music-reactive-multicolor-led-lightsMaheshSrinivasan25
 
An Hour of Arduino and Ardublock
An Hour of Arduino and ArdublockAn Hour of Arduino and Ardublock
An Hour of Arduino and ArdublockThings Lab
 

Similar to Introduction to Arduino (20)

Arduino spooky projects_class1
Arduino spooky projects_class1Arduino spooky projects_class1
Arduino spooky projects_class1
 
Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
aurduino-200107075953.pdf
aurduino-200107075953.pdfaurduino-200107075953.pdf
aurduino-200107075953.pdf
 
Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming Arduino: On-board components description, IDE and Programming
Arduino: On-board components description, IDE and Programming
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2
 
Aurdidino1 anurag preetirajesh-sgsits
Aurdidino1  anurag preetirajesh-sgsitsAurdidino1  anurag preetirajesh-sgsits
Aurdidino1 anurag preetirajesh-sgsits
 
IOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdfIOT WORKSHEET 1.4.pdf
IOT WORKSHEET 1.4.pdf
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
ArduinoPart1.ppt
ArduinoPart1.pptArduinoPart1.ppt
ArduinoPart1.ppt
 
ArduinoPart1.ppt
ArduinoPart1.pptArduinoPart1.ppt
ArduinoPart1.ppt
 
ArduinoPart1.ppt
ArduinoPart1.pptArduinoPart1.ppt
ArduinoPart1.ppt
 
Arduino day
Arduino dayArduino day
Arduino day
 
Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1
 
#startathon2.0 - Arduino
#startathon2.0 - Arduino#startathon2.0 - Arduino
#startathon2.0 - Arduino
 
Indroduction arduino
Indroduction arduinoIndroduction arduino
Indroduction arduino
 
Indroduction the arduino
Indroduction the arduinoIndroduction the arduino
Indroduction the arduino
 
Electronics Arduino Processors
Electronics Arduino ProcessorsElectronics Arduino Processors
Electronics Arduino Processors
 
computer system Architecture (Food detector)
computer system Architecture (Food detector)computer system Architecture (Food detector)
computer system Architecture (Food detector)
 
295889096 music-reactive-multicolor-led-lights
295889096 music-reactive-multicolor-led-lights295889096 music-reactive-multicolor-led-lights
295889096 music-reactive-multicolor-led-lights
 
An Hour of Arduino and Ardublock
An Hour of Arduino and ArdublockAn Hour of Arduino and Ardublock
An Hour of Arduino and Ardublock
 

More from yeokm1

I became a Private Pilot and this is my story
I became a Private Pilot and this is my storyI became a Private Pilot and this is my story
I became a Private Pilot and this is my storyyeokm1
 
What's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeWhat's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeyeokm1
 
Speaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior DevsSpeaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior Devsyeokm1
 
Reflections on Trusting Trust for Go
Reflections on Trusting Trust for GoReflections on Trusting Trust for Go
Reflections on Trusting Trust for Goyeokm1
 
Meltdown and Spectre
Meltdown and SpectreMeltdown and Spectre
Meltdown and Spectreyeokm1
 
Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486yeokm1
 
BLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev ScoutBLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev Scoutyeokm1
 
BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017yeokm1
 
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiteryeokm1
 
PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)yeokm1
 
SP Auto Door Unlocker
SP Auto Door UnlockerSP Auto Door Unlocker
SP Auto Door Unlockeryeokm1
 
SP IoT Doorbell
SP IoT DoorbellSP IoT Doorbell
SP IoT Doorbellyeokm1
 
Distance Machine Locker
Distance Machine LockerDistance Machine Locker
Distance Machine Lockeryeokm1
 
A Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech ThingA Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech Thingyeokm1
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chatyeokm1
 
The slide rule
The slide ruleThe slide rule
The slide ruleyeokm1
 
Windows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareWindows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareyeokm1
 
Repair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker TrainingRepair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker Trainingyeokm1
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardwareyeokm1
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Piyeokm1
 

More from yeokm1 (20)

I became a Private Pilot and this is my story
I became a Private Pilot and this is my storyI became a Private Pilot and this is my story
I became a Private Pilot and this is my story
 
What's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light planeWhat's inside a Cessna 172 and flying a light plane
What's inside a Cessna 172 and flying a light plane
 
Speaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior DevsSpeaking at Tech meetups/conferences for Junior Devs
Speaking at Tech meetups/conferences for Junior Devs
 
Reflections on Trusting Trust for Go
Reflections on Trusting Trust for GoReflections on Trusting Trust for Go
Reflections on Trusting Trust for Go
 
Meltdown and Spectre
Meltdown and SpectreMeltdown and Spectre
Meltdown and Spectre
 
Gentoo on a 486
Gentoo on a 486Gentoo on a 486
Gentoo on a 486
 
BLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev ScoutBLE Localiser (Full) for iOS Dev Scout
BLE Localiser (Full) for iOS Dev Scout
 
BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017BLE Localiser for iOS Conf SG 2017
BLE Localiser for iOS Conf SG 2017
 
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
Repair Kopitiam Specialty Tools (Part 2): Short Circuit Limiter
 
PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)PCB Business Card (Singapore Power)
PCB Business Card (Singapore Power)
 
SP Auto Door Unlocker
SP Auto Door UnlockerSP Auto Door Unlocker
SP Auto Door Unlocker
 
SP IoT Doorbell
SP IoT DoorbellSP IoT Doorbell
SP IoT Doorbell
 
Distance Machine Locker
Distance Machine LockerDistance Machine Locker
Distance Machine Locker
 
A Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech ThingA Science Project: Building a sound card based on the Covox Speech Thing
A Science Project: Building a sound card based on the Covox Speech Thing
 
A Science Project: Swift Serial Chat
A Science Project: Swift Serial ChatA Science Project: Swift Serial Chat
A Science Project: Swift Serial Chat
 
The slide rule
The slide ruleThe slide rule
The slide rule
 
Windows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardwareWindows 3.1 (WFW) on vintage and modern hardware
Windows 3.1 (WFW) on vintage and modern hardware
 
Repair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker TrainingRepair Kopitiam Circuit Breaker Training
Repair Kopitiam Circuit Breaker Training
 
A2: Analog Malicious Hardware
A2: Analog Malicious HardwareA2: Analog Malicious Hardware
A2: Analog Malicious Hardware
 
Getting Started with Raspberry Pi
Getting Started with Raspberry PiGetting Started with Raspberry Pi
Getting Started with Raspberry Pi
 

Recently uploaded

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...itnewsafrica
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
Irene Moetsana-Moeng: Stakeholders in Cybersecurity: Collaborative Defence fo...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Introduction to Arduino

  • 1. Introduction to Arduino/Genuino Uno By: Yeo Kheng Meng (yeokm1@gmail.com) https://github.com/SustainableLivingLab/intro-to-arduinoStartathon (20 Feb 2016) 1
  • 2. Components/Software check • Laptop loaded with Arduino IDE • Whole Hackpack or at least • Arduino Uno • Breadboard • USB cable • LED • Button • 220 ohm resistor • 10k ohm resistor • At least a few jumper wires
  • 3. Why the 2 names? • Different branding • Arduino (sold in USA) • Genuino (sold everywhere else) • Some disagreements between the founders • Uno boards from both brands are otherwise identical
  • 5. Digital Logic Levels • Logic HIGH = True = ON = +5V / +3.3V • Logic LOW = False = OFF = 0V • +5V for Arduino Uno • +3.3V may be used by other devices
  • 6. Analog signal • Analog signals are smooth and continuous • Can be positive and/or negative or both • Signals will be converted by analog-to-digital converter (ADC) in Arduino before use • Arduino’s resolution is 10bits: 210 = 1024 • Range: 0 – 5V >>>> 0 – 1024 𝑅𝑒𝑠𝑢𝑙𝑡 = 𝑆𝑜𝑢𝑟𝑐𝑒 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 𝑀𝑎𝑥 𝐿𝑜𝑔𝑖𝑐 𝑉𝑜𝑙𝑡𝑎𝑔𝑒 (5𝑉) ∗ 1024
  • 7. Breadboard • Your main prototyping component • Continuous lines indicate those holes are connected together • Horizontal usually for power • Convention: Red for +, Black/Blue for - • Vertical for your components
  • 8. Now we come to the Arduino • Programmable board • Use program code to: • Receive signal inputs from pins • Control signal outputs of pins
  • 9. Ex 1: Blink onboard LED • Sanity check, verifies if working • Arduino hardware • Arduino IDE settings • Arduino IDE settings • Arduino board: Arduino/Gemuino Uno • Port: Depends on your machine • Click “Upload” button (2nd from left) • Understand source code • Onboard LED blinks at 1 second intervals Exercise objectives: 1. Use an example 2. Understand Arduino code format 3. Concept of pins 4. Output to pin 5. Upload code
  • 10. Create new Arduino file 1. Create folder on desktop 2. File -> New 3. Name program filename same as folder name • Example: myblinker.ino
  • 11. Ex 2: Blink external LED • 220ohm resistor is to prevent too much current from flowing -> Damage LED • Arduino IDE instructions 1. Copy-paste Blink example to your new file 2. Change Pin number 13 > 12 Exercise objectives: 1. Basic wiring up of breadboard 2. Creating your own Arduino sketch
  • 12. Ex 3: Button adjusts LED state • We will now try to toggle the LED whenever button is pressed • 10k ohm pull-down resistor • Ensures button pin is LOW when button is not pressed -> Not floating • Prevents short circuit when button is pressed • Execute the code in Ex3 • Does the LED toggle as expected? • Why? Exercise objectives: 1. Retrieving input 2. Prevent floating pin 3. If-else branching
  • 13. Ex 4: Debouncing • Now lets try some code to solve this problem Exercise objectives: 1. Long datatype 2. Debouncing 3. millis() function 4. Use of && • Debouncing: • Accept only one input within certain time period
  • 14. Ex 5: Blink LED 3x on button press • Blink LED 3x with blink separation of 100ms Exercise objectives: 1. For - loop
  • 15. Ex 6: Serial Port Debugging • Useful debugging tool • Let’s print out something when button is pressed • Print the steps. • Good practice to print “Arduino Ready” at end of setup() • Tools -> Serial Monitor • Ensure baud rate eg. 9600 match what you place in code Exercise objectives: 1. Print Data over Serial