Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Experiment 1a - The Blinking LED
- This program covers using delay to turn ON/OFF the LED in regular interval
- Components Required
- 1 Arduino Board
- 1 LED
- 1 Resistor (220 ohm to 1K ohm)
- */
- void setup() {
- pinMode(13, OUTPUT); // Initialize Arduino Digital Pin 13 as output
- }
- void loop()
- {
- digitalWrite(13, HIGH); // Switch On LED
- delay(1000); // Wait for 1000 millisecond (or) second
- digitalWrite(13, LOW); // Switch Off LED
- delay(1000); // Wait for 1 second
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement