Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import time # librería delay
  2. import board # librería placa
  3. import neopixel
  4. led = neopixel.NeoPixel(board.NEOPIXEL, 1) # Seteo de pin y cantidad de LEDs
  5.  
  6. led.brightness = 0.5 # Brillo de 0 a 1 (1 es 100% y 0.5 es 50%)
  7.  
  8. while True:
  9. led[0] = (255, 0, 0) # Valores RGB (R, G, B)
  10. time.sleep(0.5)
  11. led[0] = (0, 255, 0)
  12. time.sleep(0.5)
  13. led[0] = (0, 0, 255)
  14. time.sleep(0.5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement