Learn Arduino
Learning Arduino
Learning Arduino
What is Arduino?
What is Arduino?
Arduino Components
Arduino Components
Micro Controller
Micro Controller
LEDS
LEDS
Resistors
Resistors
Breadboard
Breadboard
Jumper Wire
Jumper Wire
Ultrasonic Sensor
Ultrasonic Sensor
Servo Motor
Servo Motor
Buzzer
Buzzer
Combining Hardware and Software
Combining Hardware and Software
Doing an Arduino project involves both hardware and software setup. Part of the project will involve setting up a circuit, or a complete path for electrons to flow. The other part will invlove writing a program to control the various components in your project.
Doing an Arduino project involves both hardware and software setup. Part of the project will involve setting up a circuit, or a complete path for electrons to flow. The other part will invlove writing a program to control the various components in your project.
Example of Hardware Setup
Example of Hardware Setup
LED Circuit
Example of Software Setup
Example of Software Setup
Arduino Program
Additional Information
Additional Information
More on Programming
More on Programming
Setting up a Circuit
Setting up a Circuit
What's Wrong?
What's Wrong?
Programming
Programming
Void Setup
Void Setup
This section of the program only runs once when the program begins. You normally use pinMode() in this section to setup which pins are going to be used later in the program and whether they are going to be used as OUTPUT or INPUT
This section of the program only runs once when the program begins. You normally use pinMode() in this section to setup which pins are going to be used later in the program and whether they are going to be used as OUTPUT or INPUT
Void Loop
Void Loop
This section of the program continue to loop as long as the program is running. The main part of your code will be placed in this section.
This section of the program continue to loop as long as the program is running. The main part of your code will be placed in this section.
Void Setup
Void Setup
Sets pin 8 as OUTPUT
Void Loop
Void Loop
Turns LED ON and OFF
pinMode()
pinMode()
This functions sets a particular pin to act as either an INPUT or OUTPUT.
This functions sets a particular pin to act as either an INPUT or OUTPUT.
o An INPUT takes in or recieves information
o An INPUT takes in or recieves information
o An OUTPUT give out power to the components in the circuit
o An OUTPUT give out power to the components in the circuit
OUTPUT
OUTPUT
Needs power to turn on
INPUT
INPUT
Takes in button state (pressed/not pressed)
digitalWrite()
digitalWrite()
This function allows you to send voltage (HIGH) or stop voltage (LOW) through the circuit.
This function allows you to send voltage (HIGH) or stop voltage (LOW) through the circuit.
HIGH
HIGH
LED Turns on
LOW
LOW
LED Turns off
delay()
delay()
This function allows you to add small "pauses" in your program in between lines of code. The time for the delay needs to be given in milliseconds and placed inside the parenthesis.
This function allows you to add small "pauses" in your program in between lines of code. The time for the delay needs to be given in milliseconds and placed inside the parenthesis.
Variables
Variables
Functions
Functions
For Loops
For Loops