belrey10

Lesson #2: Blink an LED

Nov 2nd, 2024 (edited)
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.30 KB | Source Code | 0 0
  1. int LEDPIN = 8;
  2.  
  3. void setup() {
  4.   // put your setup code here, to run once:
  5.   pinMode(LEDPIN, OUTPUT);
  6. }
  7.  
  8. void loop() {
  9.   // put your main code here, to run repeatedly:
  10.   digitalWrite(LEDPIN, HIGH); // HIGH = 5V, LOW = GROUND VOLTAGE
  11.   delay(500);
  12.   digitalWrite(LEDPIN, LOW);
  13.   delay(500);
  14. }
Add Comment
Please, Sign In to add comment