SlideShare a Scribd company logo
1 of 74
Arduino Programming
Agenda
 What is Arduino?
 What can I make with Arduino?
 Getting started
 Digital Inputs and Outputs
 Analog Inputs and Outputs
 Neopixels
 Putting It All Together
 Summary
What is Arduino?
“Arduino is an open-source electronics
prototyping platform based on flexible, easy-to-
use hardware and software. It's intended for
artists, designers, hobbyists, and anyone
interested in creating interactive objects or
environments.“
http://www.arduino.cc/
What is Arduino?
 A programming environment for Windows,
Mac or Linux
 A hardware specification
 Software libraries that can be reused in your
programs
All for FREE!*
* Except the price of the hardware you purchase
What is Arduino?
 There are many types of hardware for
different needs
Arduino UNO
 The most commonly used Arduino board
 We will be using this board in this workshop
Arduino UNO
• Microprocessor – Atmega328
• 16 Mhz speed
• 14 Digital I/O Pins
• 6 Analog Input Pins
• 32K Program Memory
• 2K RAM
• 1k EEPROM
• Contains a special program
called a “Bootloader”
• Allows programming from
USB port
• Requires 0.5K of Program
Memory
Arduino UNO
• USB Interface
• USB client device
• Allows computer to
program the
Microprocessor
• Can be used to
communicate with
computer
• Can draw power from
computer to run Arduino
Arduino UNO
• Power Supply
• Connect 7V – 12V
• Provides required 5V to
Microprocessor
• Will automatically pick USB or
Power Supply to send power to
the Microprocessor
Arduino UNO
• Indicator LEDs
• L – connected to digital pin
13
• TX – transmit data to
computer
• RX – receive data from
computer
• ON – when power is
applied
Arduino UNO
• Quartz Crystal which provides
16Mhz clock to Microprocessor
Arduino UNO
• Reset Button
• Allows you to reset the
microprocessor so
program will start from the
beginning
Arduino UNO
• Input/Output connectors
• Allows you to connect
external devices to
microprocessor
• Can accept wires to
individual pins
• Circuit boards “Shields”
can be plugged in to
connect external devices
Arduino Shields
 Many companies have created
Shields that can be used with
Arduino boards
 Examples
Motor/Servo interface
SD memory card interface
Ethernet network interface
GPS
LED shields
Prototyping shields
What can I make with Arduino?
 Alarm Clock
 http://hackaday.com/2011/07/04/alarm-clock-forces-you-to-play-tetris-to-prove-you-are-awake/
What can I make with Arduino?
 Textpresso
 http://www.geekwire.com/2012/greatest-invention-textspresso-machine-change-coffee-ordering/
What can I make with Arduino?
 Automatic Pet Water Dispenser
 http://hackaday.com/2011/05/24/automated-faucet-keeps-your-cat-watered/
What can I make with Arduino?
Let’s GO!
 Get the hardware
Buy an Arduino UNO
Buy (or repurpose) a USB cable
 Get the software
http://arduino.cc/en/GuideHomePage
 Follow the instructions on this page to install
the software
 Connect the Arduino to your computer
 You are ready to go!
Lab 1
 Blink the onboard LED
Congratulations!!!
Review the Sketch
/*
Blink
. . .
*/
// set the LED on
// wait for a second
 These are comments
 The computer ignores them
 Humans can read them to learn about the
program
Review the Sketch
void setup() {
pinMode(13, OUTPUT);
}
 Brackets { and } contain a block of code
Each line of code in this block runs sequentially
 void setup() tells the program to only run
them once
When the board turns on
When the reset button is pressed
Review the Sketch
void setup() {
pinMode(13, OUTPUT);
}
 Tells the Arduino to setup pin 13 as an Output
pin
 Each pin you use needs be setup with pinMode
 A pin can be set to OUTPUT or INPUT
Review the Sketch
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
 void loop () runs the code block over and over
until you turn off the Arduino
 This code block only runs after setup is
finished
Review the Sketch
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
 HIGH tells the Arduino to turn on the output
 LOW tells the Arduino to turn off the output
 13 is the pin number
Review the Sketch
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
 Code runs very fast
 Delay tells the Arduino to wait a bit
 1000 stands for 1,000 milliseconds or one
second
Change the Sketch
void loop() {
digitalWrite(13, HIGH);
delay(500);
digitalWrite(13, LOW);
delay(500);
}
 Change the 1000’s to 500
 Upload the code to the Arduino
 What happens now?
Arduino Digital Pins
 These pins are used to communicate with the
outside world
 When an output pin is HIGH, it can provide 5V
at 40mA maximum
Trying to get more than 40mA out of the pin will
destroy the Microprocessor!
 When the output pin is LOW, it provides no
current
 You can use a transistor and/or a relay to
provide a higher voltage or more current
Connecting a new LED
 Most LEDs will work with 5V at 20mA or
30mA
 Make sure to check them before connecting
to your Arduino! – Use your volt meter
 An LED requires a resistor to limit the current
Without the resistor, the LED will draw too much
current and burn itself out
Connecting a new LED
 LEDs are polarized devices
 One side needs to be connected to + and one
side needs to be connected to –
 If you connect it backwards, it will not light
 Usually:
Minus is short lead and flat side
Plus is long lead and rounded side
 A resistor is non-polarized
It can be connected either way
Lab 2
 Connect the two LEDs on the breadboard
 Modify the code to blink the second LED, too
 Blink them all
Input
 The pins can be used to accept an input also
 Digital pins can read a voltage (1) or no
voltage (0)
 Analog pins can read voltage between 0V and
5V. You will read a value of 0 and 1023.
 Both of these return a value you can put into a
variable and/or make decisions based on the
value
Input
 Example
int x;
x = digitalRead(2);
if ( x == HIGH ) {
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
Push Button
 A push button can be connected to a
digital pin
 There is an open circuit normally
 There is a closed circuit when pressed
 If connected between 5V and a pin, we
get 5V when pressed, but an open circuit
when not pressed
 This is a problem – we need 0V when not
pressed
Push Button
 There is a solution
 A resistor to 5V will make the pin HIGH when
the button is not pressed
 Pressing it will make the pin LOW
 The resistor makes sure we don’t connect 5V
directly to Ground
Push Button
 This is a common method for using push
buttons
 The resistor is called a “Pull Up Resistor”
 The Arduino has built in pull up resistors on
the digital pins
 We need to enable them when we need them
Push Button
 This code enables the pull up resistor:
pinMode(2, INPUT);
digitalWrite(2, HIGH);
Or, the one line version:
pinMode(2, INPUT_PULLUP);
Lab 3
Connect a push button
Load the basic button code
Turn LEDs on/off based on button press
Load the toggle code. Pay attention to
reactions to your button presses, and count in
the Serial terminal.
Try again with the debounce code. Did that
help?
Other Sensors/Devices
 There are many other devices you can
connect to an Arduino
Servos to move things
GPS to determine location/time
Real Time Clock to know what time it is
Accelerometers, Chemical detectors…
LCD displays
Memory cards
More!
Let’s Go Analog
 So far we’ve dealt with the on/off digital
world.
 Many interesting things we want to measure
(temperature, light, pressure, etc) have a
range of values.
The Potentiometer
 Very simple analog input – used to control
volume, speed, and so on.
 It allows us to vary two resistance values.
The Serial Port
 You can communicate between the Arduino
and the computer via the USB cable.
 This can help you out big time when you are
debugging.
 It can also help you control programs on the
computer or post information to a web site.
Serial.begin(9600);
Serial.println(“Hello World.”);
Lab 3
 Connect potentiometer
 Upload and run code
 Turn the knob
 Watch the value change in the Serial Monitor
The Voltage Divider
 There are many, many sensors based on
varying resistance: force sensors, light
dependent resistors, flex sensors, and more
 To use these you need to create a ‘voltage
divider’.
The Voltage Divider
Light Sensor
 R2 will be our photocell
 R1 will be a resistor of our choice
 Rule of thumb is: R1 should be in the middle
of the range.
Lab 4
 Wire up the photocell
 Same code as Lab 3
 Take note of the max and min values
 Try to pick a value for a dark/light threshold.
Analog Output
 Flashing a light is neat, but what about fading
one in and out?
 Or changing the color of an RGB LED?
 Or changing the speed of a motor?
PWM (Pulse Width Modulation)
Lab 5
 Wire up the Breadboard
 Load the code. Take note of the for loop.
 Watch the light fade in and out
 Experiment with the code to get different
effects
Making Things Move
 So far we’ve communicated with the world by
blinking or writing to Serial
 Let’s make things move!
Servos
 Used in radio controlled planes and cars
 Good for moving through angles you specify
#include <Servo.h>
Servo myservo;
void setup() {
myservo.attach(9);
}
void loop() {}
Lab 6
 Wire up the breadboard
 Upload the code
 Check it out, you can control the servo!
 The map function makes life easy and is very,
very handy:
map(value, fromLow, fromHigh, toLow,
toHigh);
Lab 6 (part 2)
 Upload the code for random movement.
 Watch the values in the Serial monitor. Run
the program multiple times. Is it really
random?
 Try it with ‘randomSeed’, see what happens.
Lab 7: Neopixels
 Neopixels are Adafruit’s ‘rebranding’ of
WS2812B Addressable RGB LEDs (‘Neopixel’
is way catchier)
 You can chain them together and control as
many pixels as you want (or can power) with a
single pin!
 You can buy strips and rings of them.
 However, the code is not built in to the
Arduino IDE, so you have to install a library
 This is something you often need for new 55
Wire it Up
 Wire it up as shown below. (Wire color is
important
56
Installing the Library
 Get the library from
https://github.com/adafruit/Adafruit_NeoPixe
l
 Go to Sketch->Import Library->Add Library
 Find the file you just downloaded
 Restart the IDE after Importing it (otherwise
you won’t see the examples)
57
Code
 Open the ‘NeopixelsWorkshop.ino’ file in the
‘NeopixelsWorkshop’ folder.
#include <Adafruit_NeoPixel.h>
// Which pin on the Arduino is connected to the
NeoPixels?
#define PIN 7
// How many NeoPixels are attached to the Arduino?
#define NUMPIXELS 2
// When we setup the NeoPixel library, we tell it how
many pixels, and which pin to use to send signals.
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS,
PIN, NEO_GRB + NEO_KHZ800);
58
…and more code
 Our ‘strip’ is an object. We call functions or
‘methods’ tied to it:
void setup() {
strip.begin();
strip.show(); // Initialize all pixels to
'off'
}
59
…and more
 To set a pixel’s color, specify the number
(start at zero). Do this for as many pixels as
you want, then call the function to show these
colors.
pixels.setPixelColor(1, pixels.Color(i,255-
i,0));
pixels.show();
 Can you guess what this program does before
you upload it?
60
Other Senses
 With a piezo or small speaker, your Arduino
can make some noise, or music (or ‘music’).
 As with game controllers, vibrating motors
can stimulate the sense of touch.
 Arduino projects exist that involve smell
(breathalyzer, scent generators).
 For taste…KegBot? ZipWhip’s cappuccino
robot?
Lab 8 – The Light Theremin
 Combine previous projects (photocell and the
piezo playing music) to create an instrument
that generates a pitch based on how much
light is hitting the photocell
 Feel free to get really creative with this.
 For extra creativity points, do something
totally different.
Summary
 We have learned
The Arduino platform components
how to connect an Arduino board to the computer
How to connect LEDs, buttons, a light sensor, a
piezo buzzer, and servos
How to send information back to the computer
Resources
 http://www.arduino.cc
 Getting Started With Arduino (Make:
Projects) book
 Beginning Arduino book
 Arduino: A Quick Start Guide book
 The adafruit learning system:
https://learn.adafruit.com/
Where to buy stuff
 Adafruit http://www.adafruit.com/
 Spark Fun http://www.sparkfun.com/
 Maker Shed http://www.makershed.com/
 Digikey http://www.digikey.com/
 Mouser http://www.mouser.com/
 Radio Shack http://www.radioshack.com/
 Find parts: http://www.octopart.com/
 Sometimes Amazon has parts too
 Ebay can have deals but usually the parts are
shipped from overseas and take a long time
Where to get help
 http://arduino.cc/forum/
 Your local Hackerspace!
Electronics 101
 Electronic devices depend on the movement of
electrons
 The amount of electrons moving from one
molecule to another is called Current which is
measured in Amps
 Batteries provide a lot of electrons that are ready
to move
 The difference in potential (the number of free
electrons) between two points is called
Electromotive Force which is measured in Volts
Electronics 101
 Materials that allow easy movement of
electrons are called Conductors
Copper, silver, gold, aluminum are examples
 Materials that do not allow easy movement of
electrons are called Insulators
Glass, paper, rubber are examples
 Some materials are poor conductors and poor
insulators.
Carbon is an example
Electronics 101
 Materials that aren’t good conductors or good
inductors provide Resistance to the
movement of electrons
 Resistance is measured in Ohms
Electronics 101
 Electrons flow from the negative
terminal of the battery through the
circuit to the positive terminal.
 But – when they discovered this,
they thought current came from the
positive terminal to the negative
 This is called conventional current
flow
I
Oops!
Electronics 101
 There needs to be a complete circuit for
current to flow
No Flow! Current will Flow!
Electronics 101
 Volts, Amps and Ohms are related
 This is called Ohms Law
I = Current in Amps
E = EMF in Volts
R = Resistance in Ohms
Electronics 101
 Example
 BAT = 9 volts
 R1 = 100 ohms
 How many amps?
 I = 0.09 Amps or 90mA
Electronics 101
 When dealing with really big numbers or
really small numbers, there are prefixes you
can use
k = kilo = 1,000 (e.g. 10 kHz = 10,000 Hz)
M = mega = 1,000,000 (e.g 1 MHz = 1,000 kHz)
m = milli = 1/1,000 (e.g 33mA = 0.033A)
u = micro = 1/1,000,000 (e.g 2uV = 0.000002V)
n = nano = 1/1,000,000,000
p = pico = 1/1,000,000,000,000

More Related Content

What's hot

Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoVishnu
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the ArduinoWingston
 
IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino PlatformEoin Brazil
 
Arduino slides
Arduino slidesArduino slides
Arduino slidessdcharle
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!Makers of India
 
Arduino Introduction Guide 1
Arduino Introduction Guide 1Arduino Introduction Guide 1
Arduino Introduction Guide 1elketeaches
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshopatuline
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينوsalih mahmod
 
Arduino Platform with C programming.
Arduino Platform with C programming.Arduino Platform with C programming.
Arduino Platform with C programming.Govind Jha
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATIONsoma saikiran
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduinoMakers of India
 
Arduino Day 1 Presentation
Arduino Day 1 PresentationArduino Day 1 Presentation
Arduino Day 1 PresentationYogendra Tamang
 
Embedded system introduction - Arduino Course
Embedded system introduction - Arduino CourseEmbedded system introduction - Arduino Course
Embedded system introduction - Arduino CourseElaf A.Saeed
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingEmmanuel Obot
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriGaurav Pandey
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduinoyeokm1
 
2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshoptrygvis
 

What's hot (20)

Lab2ppt
Lab2pptLab2ppt
Lab2ppt
 
Arduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic ArduinoArduino Workshop Day 1 - Basic Arduino
Arduino Workshop Day 1 - Basic Arduino
 
Introduction to the Arduino
Introduction to the ArduinoIntroduction to the Arduino
Introduction to the Arduino
 
IOTC08 The Arduino Platform
IOTC08 The Arduino PlatformIOTC08 The Arduino Platform
IOTC08 The Arduino Platform
 
Arduino slides
Arduino slidesArduino slides
Arduino slides
 
Introduction to arduino!
Introduction to arduino!Introduction to arduino!
Introduction to arduino!
 
Arduino course
Arduino courseArduino course
Arduino course
 
Arduino Introduction Guide 1
Arduino Introduction Guide 1Arduino Introduction Guide 1
Arduino Introduction Guide 1
 
Arduino Workshop
Arduino WorkshopArduino Workshop
Arduino Workshop
 
Arduino اردوينو
Arduino اردوينوArduino اردوينو
Arduino اردوينو
 
Arduino Platform with C programming.
Arduino Platform with C programming.Arduino Platform with C programming.
Arduino Platform with C programming.
 
ARDUINO AND ITS PIN CONFIGURATION
 ARDUINO AND ITS PIN  CONFIGURATION ARDUINO AND ITS PIN  CONFIGURATION
ARDUINO AND ITS PIN CONFIGURATION
 
Programming with arduino
Programming with arduinoProgramming with arduino
Programming with arduino
 
Arduino Day 1 Presentation
Arduino Day 1 PresentationArduino Day 1 Presentation
Arduino Day 1 Presentation
 
Embedded system introduction - Arduino Course
Embedded system introduction - Arduino CourseEmbedded system introduction - Arduino Course
Embedded system introduction - Arduino Course
 
Introduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and ProgrammingIntroduction to Arduino Hardware and Programming
Introduction to Arduino Hardware and Programming
 
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauriArduino for beginners- Introduction to Arduino (presentation) - codewithgauri
Arduino for beginners- Introduction to Arduino (presentation) - codewithgauri
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop2015-10-21 - Arduino workshop
2015-10-21 - Arduino workshop
 
Presentation
PresentationPresentation
Presentation
 

Similar to Arduino Slides With Neopixels

Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slidesmkarlin14
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptxHebaEng
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorssaritasapkal
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxethannguyen1618
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming FamiliarizationAmit Kumer Podder
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerMujahid Hussain
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004DO!MAKERS
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2Qtechknow
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfssusere5db05
 
Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1Afzal Ahmad
 
Multi Sensory Communication 1/2
Multi Sensory Communication 1/2Multi Sensory Communication 1/2
Multi Sensory Communication 1/2Satoru Tokuhisa
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduinoavikdhupar
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Ankita Tiwari
 
NSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoNSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoBrian Huang
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshopmayur1432
 

Similar to Arduino Slides With Neopixels (20)

Arduino Workshop Slides
Arduino Workshop SlidesArduino Workshop Slides
Arduino Workshop Slides
 
Arduino Workshop (3).pptx
Arduino Workshop (3).pptxArduino Workshop (3).pptx
Arduino Workshop (3).pptx
 
Arduino workshop sensors
Arduino workshop sensorsArduino workshop sensors
Arduino workshop sensors
 
IoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensorsIoT Basics with few Embedded System Connections for sensors
IoT Basics with few Embedded System Connections for sensors
 
teststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptxteststststststLecture_3_2022_Arduino.pptx
teststststststLecture_3_2022_Arduino.pptx
 
Arduino Programming Familiarization
Arduino Programming FamiliarizationArduino Programming Familiarization
Arduino Programming Familiarization
 
Introduction to Arduino Microcontroller
Introduction to Arduino MicrocontrollerIntroduction to Arduino Microcontroller
Introduction to Arduino Microcontroller
 
Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011Arduino Comic-Jody Culkin-2011
Arduino Comic-Jody Culkin-2011
 
Arduino comic v0004
Arduino comic v0004Arduino comic v0004
Arduino comic v0004
 
Arduino intro.pptx
Arduino intro.pptxArduino intro.pptx
Arduino intro.pptx
 
Intro to Arduino Revision #2
Intro to Arduino Revision #2Intro to Arduino Revision #2
Intro to Arduino Revision #2
 
Arduino Programming Basic
Arduino Programming BasicArduino Programming Basic
Arduino Programming Basic
 
arduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdfarduinocourse-180308074529 (1).pdf
arduinocourse-180308074529 (1).pdf
 
Robotics Session day 1
Robotics Session day 1Robotics Session day 1
Robotics Session day 1
 
Multi Sensory Communication 1/2
Multi Sensory Communication 1/2Multi Sensory Communication 1/2
Multi Sensory Communication 1/2
 
Intro to Arduino
Intro to ArduinoIntro to Arduino
Intro to Arduino
 
Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.Interface stepper motor through Arduino using LABVIEW.
Interface stepper motor through Arduino using LABVIEW.
 
NSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and ArduinoNSTA 2013 Denver - ArduBlock and Arduino
NSTA 2013 Denver - ArduBlock and Arduino
 
Arduino workshop
Arduino workshopArduino workshop
Arduino workshop
 
Arduino: Arduino starter kit
Arduino: Arduino starter kitArduino: Arduino starter kit
Arduino: Arduino starter kit
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Arduino Slides With Neopixels

  • 2. Agenda  What is Arduino?  What can I make with Arduino?  Getting started  Digital Inputs and Outputs  Analog Inputs and Outputs  Neopixels  Putting It All Together  Summary
  • 3. What is Arduino? “Arduino is an open-source electronics prototyping platform based on flexible, easy-to- use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.“ http://www.arduino.cc/
  • 4. What is Arduino?  A programming environment for Windows, Mac or Linux  A hardware specification  Software libraries that can be reused in your programs All for FREE!* * Except the price of the hardware you purchase
  • 5. What is Arduino?  There are many types of hardware for different needs
  • 6. Arduino UNO  The most commonly used Arduino board  We will be using this board in this workshop
  • 7. Arduino UNO • Microprocessor – Atmega328 • 16 Mhz speed • 14 Digital I/O Pins • 6 Analog Input Pins • 32K Program Memory • 2K RAM • 1k EEPROM • Contains a special program called a “Bootloader” • Allows programming from USB port • Requires 0.5K of Program Memory
  • 8. Arduino UNO • USB Interface • USB client device • Allows computer to program the Microprocessor • Can be used to communicate with computer • Can draw power from computer to run Arduino
  • 9. Arduino UNO • Power Supply • Connect 7V – 12V • Provides required 5V to Microprocessor • Will automatically pick USB or Power Supply to send power to the Microprocessor
  • 10. Arduino UNO • Indicator LEDs • L – connected to digital pin 13 • TX – transmit data to computer • RX – receive data from computer • ON – when power is applied
  • 11. Arduino UNO • Quartz Crystal which provides 16Mhz clock to Microprocessor
  • 12. Arduino UNO • Reset Button • Allows you to reset the microprocessor so program will start from the beginning
  • 13. Arduino UNO • Input/Output connectors • Allows you to connect external devices to microprocessor • Can accept wires to individual pins • Circuit boards “Shields” can be plugged in to connect external devices
  • 14. Arduino Shields  Many companies have created Shields that can be used with Arduino boards  Examples Motor/Servo interface SD memory card interface Ethernet network interface GPS LED shields Prototyping shields
  • 15. What can I make with Arduino?  Alarm Clock  http://hackaday.com/2011/07/04/alarm-clock-forces-you-to-play-tetris-to-prove-you-are-awake/
  • 16. What can I make with Arduino?  Textpresso  http://www.geekwire.com/2012/greatest-invention-textspresso-machine-change-coffee-ordering/
  • 17. What can I make with Arduino?  Automatic Pet Water Dispenser  http://hackaday.com/2011/05/24/automated-faucet-keeps-your-cat-watered/
  • 18. What can I make with Arduino?
  • 19. Let’s GO!  Get the hardware Buy an Arduino UNO Buy (or repurpose) a USB cable  Get the software http://arduino.cc/en/GuideHomePage  Follow the instructions on this page to install the software  Connect the Arduino to your computer  You are ready to go!
  • 20. Lab 1  Blink the onboard LED Congratulations!!!
  • 21. Review the Sketch /* Blink . . . */ // set the LED on // wait for a second  These are comments  The computer ignores them  Humans can read them to learn about the program
  • 22. Review the Sketch void setup() { pinMode(13, OUTPUT); }  Brackets { and } contain a block of code Each line of code in this block runs sequentially  void setup() tells the program to only run them once When the board turns on When the reset button is pressed
  • 23. Review the Sketch void setup() { pinMode(13, OUTPUT); }  Tells the Arduino to setup pin 13 as an Output pin  Each pin you use needs be setup with pinMode  A pin can be set to OUTPUT or INPUT
  • 24. Review the Sketch void loop() { digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000); }  void loop () runs the code block over and over until you turn off the Arduino  This code block only runs after setup is finished
  • 25. Review the Sketch void loop() { digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000); }  HIGH tells the Arduino to turn on the output  LOW tells the Arduino to turn off the output  13 is the pin number
  • 26. Review the Sketch void loop() { digitalWrite(13, HIGH); delay(1000); digitalWrite(13, LOW); delay(1000); }  Code runs very fast  Delay tells the Arduino to wait a bit  1000 stands for 1,000 milliseconds or one second
  • 27. Change the Sketch void loop() { digitalWrite(13, HIGH); delay(500); digitalWrite(13, LOW); delay(500); }  Change the 1000’s to 500  Upload the code to the Arduino  What happens now?
  • 28. Arduino Digital Pins  These pins are used to communicate with the outside world  When an output pin is HIGH, it can provide 5V at 40mA maximum Trying to get more than 40mA out of the pin will destroy the Microprocessor!  When the output pin is LOW, it provides no current  You can use a transistor and/or a relay to provide a higher voltage or more current
  • 29. Connecting a new LED  Most LEDs will work with 5V at 20mA or 30mA  Make sure to check them before connecting to your Arduino! – Use your volt meter  An LED requires a resistor to limit the current Without the resistor, the LED will draw too much current and burn itself out
  • 30. Connecting a new LED  LEDs are polarized devices  One side needs to be connected to + and one side needs to be connected to –  If you connect it backwards, it will not light  Usually: Minus is short lead and flat side Plus is long lead and rounded side  A resistor is non-polarized It can be connected either way
  • 31. Lab 2  Connect the two LEDs on the breadboard  Modify the code to blink the second LED, too  Blink them all
  • 32. Input  The pins can be used to accept an input also  Digital pins can read a voltage (1) or no voltage (0)  Analog pins can read voltage between 0V and 5V. You will read a value of 0 and 1023.  Both of these return a value you can put into a variable and/or make decisions based on the value
  • 33. Input  Example int x; x = digitalRead(2); if ( x == HIGH ) { digitalWrite(13, HIGH); } else { digitalWrite(13, LOW); }
  • 34. Push Button  A push button can be connected to a digital pin  There is an open circuit normally  There is a closed circuit when pressed  If connected between 5V and a pin, we get 5V when pressed, but an open circuit when not pressed  This is a problem – we need 0V when not pressed
  • 35. Push Button  There is a solution  A resistor to 5V will make the pin HIGH when the button is not pressed  Pressing it will make the pin LOW  The resistor makes sure we don’t connect 5V directly to Ground
  • 36. Push Button  This is a common method for using push buttons  The resistor is called a “Pull Up Resistor”  The Arduino has built in pull up resistors on the digital pins  We need to enable them when we need them
  • 37. Push Button  This code enables the pull up resistor: pinMode(2, INPUT); digitalWrite(2, HIGH); Or, the one line version: pinMode(2, INPUT_PULLUP);
  • 38. Lab 3 Connect a push button Load the basic button code Turn LEDs on/off based on button press Load the toggle code. Pay attention to reactions to your button presses, and count in the Serial terminal. Try again with the debounce code. Did that help?
  • 39. Other Sensors/Devices  There are many other devices you can connect to an Arduino Servos to move things GPS to determine location/time Real Time Clock to know what time it is Accelerometers, Chemical detectors… LCD displays Memory cards More!
  • 40. Let’s Go Analog  So far we’ve dealt with the on/off digital world.  Many interesting things we want to measure (temperature, light, pressure, etc) have a range of values.
  • 41. The Potentiometer  Very simple analog input – used to control volume, speed, and so on.  It allows us to vary two resistance values.
  • 42. The Serial Port  You can communicate between the Arduino and the computer via the USB cable.  This can help you out big time when you are debugging.  It can also help you control programs on the computer or post information to a web site. Serial.begin(9600); Serial.println(“Hello World.”);
  • 43. Lab 3  Connect potentiometer  Upload and run code  Turn the knob  Watch the value change in the Serial Monitor
  • 44. The Voltage Divider  There are many, many sensors based on varying resistance: force sensors, light dependent resistors, flex sensors, and more  To use these you need to create a ‘voltage divider’.
  • 46. Light Sensor  R2 will be our photocell  R1 will be a resistor of our choice  Rule of thumb is: R1 should be in the middle of the range.
  • 47. Lab 4  Wire up the photocell  Same code as Lab 3  Take note of the max and min values  Try to pick a value for a dark/light threshold.
  • 48. Analog Output  Flashing a light is neat, but what about fading one in and out?  Or changing the color of an RGB LED?  Or changing the speed of a motor?
  • 49. PWM (Pulse Width Modulation)
  • 50. Lab 5  Wire up the Breadboard  Load the code. Take note of the for loop.  Watch the light fade in and out  Experiment with the code to get different effects
  • 51. Making Things Move  So far we’ve communicated with the world by blinking or writing to Serial  Let’s make things move!
  • 52. Servos  Used in radio controlled planes and cars  Good for moving through angles you specify #include <Servo.h> Servo myservo; void setup() { myservo.attach(9); } void loop() {}
  • 53. Lab 6  Wire up the breadboard  Upload the code  Check it out, you can control the servo!  The map function makes life easy and is very, very handy: map(value, fromLow, fromHigh, toLow, toHigh);
  • 54. Lab 6 (part 2)  Upload the code for random movement.  Watch the values in the Serial monitor. Run the program multiple times. Is it really random?  Try it with ‘randomSeed’, see what happens.
  • 55. Lab 7: Neopixels  Neopixels are Adafruit’s ‘rebranding’ of WS2812B Addressable RGB LEDs (‘Neopixel’ is way catchier)  You can chain them together and control as many pixels as you want (or can power) with a single pin!  You can buy strips and rings of them.  However, the code is not built in to the Arduino IDE, so you have to install a library  This is something you often need for new 55
  • 56. Wire it Up  Wire it up as shown below. (Wire color is important 56
  • 57. Installing the Library  Get the library from https://github.com/adafruit/Adafruit_NeoPixe l  Go to Sketch->Import Library->Add Library  Find the file you just downloaded  Restart the IDE after Importing it (otherwise you won’t see the examples) 57
  • 58. Code  Open the ‘NeopixelsWorkshop.ino’ file in the ‘NeopixelsWorkshop’ folder. #include <Adafruit_NeoPixel.h> // Which pin on the Arduino is connected to the NeoPixels? #define PIN 7 // How many NeoPixels are attached to the Arduino? #define NUMPIXELS 2 // When we setup the NeoPixel library, we tell it how many pixels, and which pin to use to send signals. Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); 58
  • 59. …and more code  Our ‘strip’ is an object. We call functions or ‘methods’ tied to it: void setup() { strip.begin(); strip.show(); // Initialize all pixels to 'off' } 59
  • 60. …and more  To set a pixel’s color, specify the number (start at zero). Do this for as many pixels as you want, then call the function to show these colors. pixels.setPixelColor(1, pixels.Color(i,255- i,0)); pixels.show();  Can you guess what this program does before you upload it? 60
  • 61. Other Senses  With a piezo or small speaker, your Arduino can make some noise, or music (or ‘music’).  As with game controllers, vibrating motors can stimulate the sense of touch.  Arduino projects exist that involve smell (breathalyzer, scent generators).  For taste…KegBot? ZipWhip’s cappuccino robot?
  • 62. Lab 8 – The Light Theremin  Combine previous projects (photocell and the piezo playing music) to create an instrument that generates a pitch based on how much light is hitting the photocell  Feel free to get really creative with this.  For extra creativity points, do something totally different.
  • 63. Summary  We have learned The Arduino platform components how to connect an Arduino board to the computer How to connect LEDs, buttons, a light sensor, a piezo buzzer, and servos How to send information back to the computer
  • 64. Resources  http://www.arduino.cc  Getting Started With Arduino (Make: Projects) book  Beginning Arduino book  Arduino: A Quick Start Guide book  The adafruit learning system: https://learn.adafruit.com/
  • 65. Where to buy stuff  Adafruit http://www.adafruit.com/  Spark Fun http://www.sparkfun.com/  Maker Shed http://www.makershed.com/  Digikey http://www.digikey.com/  Mouser http://www.mouser.com/  Radio Shack http://www.radioshack.com/  Find parts: http://www.octopart.com/  Sometimes Amazon has parts too  Ebay can have deals but usually the parts are shipped from overseas and take a long time
  • 66. Where to get help  http://arduino.cc/forum/  Your local Hackerspace!
  • 67. Electronics 101  Electronic devices depend on the movement of electrons  The amount of electrons moving from one molecule to another is called Current which is measured in Amps  Batteries provide a lot of electrons that are ready to move  The difference in potential (the number of free electrons) between two points is called Electromotive Force which is measured in Volts
  • 68. Electronics 101  Materials that allow easy movement of electrons are called Conductors Copper, silver, gold, aluminum are examples  Materials that do not allow easy movement of electrons are called Insulators Glass, paper, rubber are examples  Some materials are poor conductors and poor insulators. Carbon is an example
  • 69. Electronics 101  Materials that aren’t good conductors or good inductors provide Resistance to the movement of electrons  Resistance is measured in Ohms
  • 70. Electronics 101  Electrons flow from the negative terminal of the battery through the circuit to the positive terminal.  But – when they discovered this, they thought current came from the positive terminal to the negative  This is called conventional current flow I Oops!
  • 71. Electronics 101  There needs to be a complete circuit for current to flow No Flow! Current will Flow!
  • 72. Electronics 101  Volts, Amps and Ohms are related  This is called Ohms Law I = Current in Amps E = EMF in Volts R = Resistance in Ohms
  • 73. Electronics 101  Example  BAT = 9 volts  R1 = 100 ohms  How many amps?  I = 0.09 Amps or 90mA
  • 74. Electronics 101  When dealing with really big numbers or really small numbers, there are prefixes you can use k = kilo = 1,000 (e.g. 10 kHz = 10,000 Hz) M = mega = 1,000,000 (e.g 1 MHz = 1,000 kHz) m = milli = 1/1,000 (e.g 33mA = 0.033A) u = micro = 1/1,000,000 (e.g 2uV = 0.000002V) n = nano = 1/1,000,000,000 p = pico = 1/1,000,000,000,000