Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw 5.9.2014.

Similar presentations


Presentation on theme: "Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw 5.9.2014."— Presentation transcript:

1 Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw 5.9.2014

2 Microcontroller

3 Video FileFile

4 8 STEPS to start with Arduino on Windows 1.Get an Arduino Board and USB cable 2.Download the Arduino Environment (http://arduino.cc/en/Main/Software#toc2) 3. Connect the board 4. Install the drivers 5.Launch the Arduino application 6. Open the blink example 7. Select your board 8.Select your serial port 9.Upload the program

5 1.1.

6 6.

7 7.7.

8 Hello World Hardware 1. Arduino UNO R3 2. Bread-board 3. Jumper (connecting wires) 4. Light emitting diode (LED) 5. Resistor

9 Circuit Diagram

10 Software Syntax PinMode(pin,Mode) digitalWrite(pin,Value) digitalRead(pin)

11 /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) delay(1000); // wait for a second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for a second }

12 Exercise(1) Now, the next assignment is to implement a digital switch using the board. We need 1 digital on-off switch and 1- 10 resistor and some more connecting wires. We will also make use of the 5V input pin of the board and pin-2 as digital input pin. Connect the circuit as shown in figure. Use the function pinMode() to declare the mode of pin-2. Use the if statement to check the condition of the digital switch or if the digital input is HIGH. If the input is HIGH then "Blink" the LED, otherwise, the LED should not blink. Use digitalRead() function to check the condition of the pin-2.

13

14 References. http://arduino.cc.. http://arduino.cc/en/Main/ArduinoBoardUno.. http://arduino.cc/en/Guide/Introduction.. www.atmel.com/Images/doc8161.pdf.. "Arduino Programming Notebook" by - by Brian W. Evans.. Beginning Android ADK with Arduino by Mario Bohmer. http://arduino.cc/en/Tutorial/Button. http://arduino.cc/en/Tutorial/Blink

15


Download ppt "Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw 5.9.2014."

Similar presentations


Ads by Google