Arduino GPIO LED Blink

RohitTelkar
RohitTelkar

Solving Approach

  • Components
Arduino1
LED1
Resistor330ohm
  •  Connection
    • Connect one terminal of LED to 330 ohm resistor and one terminal to ground of arduino.
    • Connect one terminal of resistor to arduino PIN 7.
       
  • Code
int PIN =7;
void setup()
{
	pinMode(PIN, OUTPUT);
}

void loop() 
{
	digitalWrite(PIN, HIGH);
	delay(400);
	digitalWrite(PIN, LOW);
	delay(800);
}

 

  • Output

Submit Your Solution

Note: Once submitted, your solution goes public, helping others learn from your approach!