Slide Arduino IDEASasd
Slide Arduino IDEASasd
DAY 2
RC Servo
LCD Shield: Hardware Description
Keypad
PC communication with Arduino
DAY 3
Motor Driver Shield : Hardware Description
Line Trekking robot
Wireless Control Shield : Hardware Description
Android Smartphone with Arduino
DAY 4
PS2 2.4Ghz Communication with Arduino
MotoDuino: Hardware Description
(Innovation by Circuit Ideas Resources)
HANDS ON LABS
Lab1-ON LED
Lab 2-LED Blinking
Lab 3-Buzzer beeping
Lab 4- LDR Analog read serial
Lab 5-Smart lamp using LDR
Lab 6-Read a Switch
Lab 7-Spinning a Motor
Lab 8-RC Servo basic
Lab 9-RC servo with potentiometer
Lab 10-LCD Shield ‘Hello world’
Lab 11- Keypad
Lab 12- PC communication with Arduino
Lab 13-Line Trekking robot
Lab 14- Android Communication with Arduino
(using bluetooth communication)
Lab 15- PS2 2.4GHz to control the robot
Lab 16- Control Relay and Buzzer
WHAT IS AN ARDUINO ?
Arduino is an open-source physical computing
platform designed to make experimenting with
electronics, more fun and intuitive.
Arduinoteam
(David Cuartielles, David Mellis,Gianluca Martino
and Tom Igoe)
BASIC INPUT AND OUTPUT
a) Digital Input
This allows us to read the state of simple sensor, like pushbuttons
or switches.
b) Digital Output
We used it to control an LED but, with the proper circuit it can
be used to control motors, make sounds and a lot more.
c) Analog Input
We can read signals from sensor that send a continuous signal
that’s not just on or off, such as a potentiometer or light sensor
d)Analog Output
This gives us the ability to control the brightness of the LED,
not just turn it on or off.
we can even control the speed of a motor with it.
e)Serial Communication
This allow us to communicate with a computer and exchange
data or simply monitor what’s going on with the sketch that’s
running on the Arduino
ARDUINO BOARD
FEATURES
Using ATmega16U2 for USB to Serial driver instead of
FTDI chip
Flash memory 256KB, 8KB used by bootloader
SRAM 8KB
EEPROM 4KB
+ve
Resistor
Push Button
LED
-ve
ARDUINO MAKES IT
SMARTER
A system that can receive information (input data) ,
manipulate the data according to preset algorithms
(instructions) and send command (output data) can
be considered as smart.
15
THE SOFTWARE(IDE)-SKETCH
GUI-GRAPHICAL USER INTERFACE
SKETCH-BASIC
INPUT AND OUTPUT
FUNCTIONS
Arduino includes functions for handling input and output.
a) pinMode(pin, mode)
Reconfigures a digital pin to behave either as input or and output.
Example;
pinMode(7, INPUT); //turns pin 7 into an input
pinMode(8, OUTPUT); //turns pin 8 into an output
b) digitalWrite(pin, value)
Turns a digital pin either on or off.
Example;
digitalWrite(8,HIGH); //turns on digital pin 8
digitalWrite(8,LOW); //turns off digital pin 8
INPUT AND OUTPUT
FUNCTIONS
c) int digitalRead(pin)
Reads the state of an input pin, returns HIGH if the pin senses
some voltage or LOW if there is no voltage applied
Example;
d) int analogRead(pin)
Reads the voltage applied to an analog input pin and returns a
number between 0 and 1023 that represents the voltages between
0 and 5V.
Example;
f) Delay(ms)
Pauses the program for the amount of miliseconds specified.
Example;
List of examples
Ref: allaboutcircuits.com
LAB 1-ON LED
Resistor
LED
Lab1- ON led
Orange color
means the word
is predefined in
the library Next, we create the setup loop.
Format
pinMode(constant name / pin# , behaviour)
Format:
digitalWrite(pin# or constant,behaviour)
Summary:
Now you should know the basic
structure when program the
arduino.
Resistor
LED
Lab 2: Blinking LED
Format:
delay(x);
Where x is value in mili
seconds
DONE.. Easy
LAB 3-BUZZER BEEPING
BUZZER
LED
LED AND BUZZER AS OUTPUT
LAB 4-LDR ANALOG READ SERIAL
LED
LDR
Resistor
LDR- LIGHT DEPENDENT
RESISTOR
LAB 5-SMART LAMP
LED
LDR
Resistor
SMART LAMP/LED
LAB 6- READ A SWITCH
LED
SWITCH
BUZZER
READ A SWITCH
LAB 7 – SPINNING A MOTOR
MOTOR 2 MOTOR 1
2A MOTOR SHIELD
SPINNING A MOTOR
LAB 8 – LINE TREKKING ROBOT
MOTOR 2 MOTOR 1
2A MOTOR SHIELD
LINE TREKKING ROBOT
THANK YOU
KAMALLUDIN BIN MANSOR
GENERAL MANAGER
[email protected]
019-2396672
+603-21410787 (office)
+603- 21410722(fax)