I have prepared this presentation when I was studying at Western Region Campus. I along with some of my friends conducted training for junior students on Arduino. Its day-1 presentation.
2. INTRODUCTION TO ARDUINO
- Open Source Hardware and Software Platform
-Self Contained Computer in an IC
INTEL 286
Arduino Diecimila
3. INTRODUCTION TO ARDUINO
- Based on AVR microcontrollers that are widely
popular for their RISC architecture, hight flash
memory, inbuilt different features
- Arduino Uses C programming(E A S Y)……
4. WHY ARDUINO?
- Inbuilt ADC, Serial Interface, PWM, IO pins
-Programming so easy……(Can be used available
libraries)
-Open Source platform
13. Functions used in
setup()1. pinMode(13, OUTPUT); makes pin 13 as output pin
2. pinMode(8, INPUT); makes pin 8 as input pin
3. Serial.begin(9600) ; starts serial communication
with Baudrate 9600
Functions used in loop()
1. digitalWrite(13, HIGH): makes pin 13 high ie pin13=ON;
2. delay(500) : delays system by 500 ms.
3. analogRead() : Reads analog value
4. analogWrite() : writes anlog value(PWM)
5. Serial.print() : Prints at serial monitor
6. Serial.println() : prints at serial monitor with line break
14. EXERCISE:
Write the code and implement:
1. One led blinking at each 1s.
2. A led with ON time=600ms and OFF time=900ms
3. You are given 6 leds. Now light these leds in different patterns
15. int ledPin = 13; // choose the pin for the LED
int inPin = 2; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
void setup()
{
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inPin, INPUT); // declare pushbutton as input
}
void loop()
{
val = digitalRead(inPin); // read input value
if (val == HIGH)
{
// check if the input is HIGH (button released)
digitalWrite(ledPin, LOW); // turn LED OFF
}
else {
digitalWrite(ledPin, HIGH); // turn LED ON
}
}