Using micropython…
Does anyone have an example of how to blink, for example LED at position 5,5 with a BLUE color?
TIA
Using micropython…
Does anyone have an example of how to blink, for example LED at position 5,5 with a BLUE color?
TIA
It’s display.pixel
to set individual pixels - more info in the PicoGraphics docs!:
Give this a try.
from galactic import GalacticUnicorn
from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN
import time
display = PicoGraphics(display=DISPLAY_GALACTIC_UNICORN)
gu = GalacticUnicorn()
gu.set_brightness(0.5)
BLACK = display.create_pen(0, 0, 0)
BLUE = display.create_pen(0, 0, 255)
while True:
display.set_pen(BLUE)
display.pixel(5, 5)
gu.update(display)
time.sleep(1)
display.set_pen(BLACK)
display.pixel(5, 5)
gu.update(display)
time.sleep(1)
Works as advertised!! Thanks!
Wow, that was fast. =)
I happen to have one to test code on. Saves the guessing. ;)