Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Arduino lab 1_0


Published on

First Arduino Lab. How to blink an LED

Published in: Self Improvement
  • Be the first to comment

Arduino lab 1_0

  1. 1. Arduino Lab 1.0 Lab 1.0 - LED Blinking
  2. 2. Material RequiredArduino Board + RS232 Cable + PowerSupplyOrArduino Mega + USB CableInstalled Arduino IDE on your computerWorking RS232 or USB port in yourcomputer
  3. 3. SetupArduino programming is like C.It has t wo basic functions.First is setup - this has all commandsthat are executed only once. void setup (void) { ; }
  4. 4. LoopSecond function is loop - This hascommands executed in a continius loop.void loop (void) { ; }
  5. 5. Predefined CommandsThere are few predefined commandsFirst command is pinMode. This sets thefunction of pin as input or output.Usually this is done in setup function void setup (void) { pinMode (13,OUTPUT); }
  6. 6. Predefined CommandsAnother is digitalWrite.This write HIGH or LOW on pins defined asOUTPUT.This can be executed in setup or loopfunctionvoid loop (void){ digitalWrite (13,HIGH);}
  7. 7. Predefined CommandAnother command is delay.This provide delay in msecs.void loop (void) { digitalWrite (13,HIGH); delay(500); digitalWrite (13,LOW); delay(500); }
  8. 8. First Program#define LED 13void setup (void){ pinMode (LED,OUTPUT);}void loop (void){ digitalWrite (LED,HIGH); delay(200); digitalWrite (LED,LOW); delay(200);}
  9. 9. Verify-UploadClick on VERIFY (Sketch | Verify)Click on UPLOAD (File | Upload)Wait - it will start running, LED willstart blinking after few seconds.Change the delay, verify and uploadagain. See the difference on blinkingtime and speed.
  10. 10. Next Level ProgramModify the program so that with singleLED you create morse code of SOS.Send me an email giving yourexperience, total time spent andproblems faced in the process.This is first part of training. You will begetting next level of training soon.
  11. 11. Contact MeHave more ideas, queries, suggestions?Contact me at -Vinay Chaddhaemail : vinay@open-embedded.infoSMS : 9811074026know more about me at
  12. 12. Check us onlineJoin our facebook page products from