0% found this document useful (0 votes)
10 views

Light Blinking Arduino Programme

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Light Blinking Arduino Programme

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Here's a simple Arduino program to blink an LED connected to an Arduino board:

Code:

cpp

CopyEdit

// Pin 13 is connected to the onboard LED on most Arduino boards int ledPin = 13; void setup() { // Set the LED pin as an output pinMode(ledPin,
OUTPUT); } void loop() { // Turn the LED on digitalWrite(ledPin, HIGH); delay(1000); // Wait for 1 second (1000 milliseconds) // Turn the LED
off digitalWrite(ledPin, LOW); delay(1000); // Wait for 1 second }

Instructions:
1. Connect the positive (longer leg) of the LED to pin 13 of the Arduino and the negative (shorter leg) to the GND pin through a 220-ohm resistor.
2. Upload the code to your Arduino board using the Arduino IDE.
3. Observe the LED blinking with a 1-second interval.

Let me know if you'd like any modifications!

You might also like