Advertisement
belrey10

Day 6: Reward – Understanding and Using Resistors

Nov 5th, 2024 (edited)
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. from machine import Pin
  2. import time
  3.  
  4. # Initialize the LED and button pins
  5. led1 = Pin(16, Pin.OUT)
  6. led2 = Pin(17, Pin.OUT)
  7. led3 = Pin(18, Pin.OUT)
  8.  
  9.  
  10. while True:
  11.     led1.on()
  12.     time.sleep(0.5)
  13.     led1.off()
  14.     led2.on()
  15.     time.sleep(0.5)
  16.     led2.off()
  17.     led3.on()
  18.     time.sleep(0.5)
  19.     led3.off()
  20.     time.sleep(0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement