• drive NeoPIXEL / ws2812 leds?

    Moved
    10
    0 Votes
    10 Posts
    5k Views
    J
    @LoneTech Yes, thanks! I read the reference manual to understand how it works, and I managed to drive the 16 LEDs of my ring. I re-wrote your code into a class so that I can use it in my project. I created a Github repo if you want to take a look : https://github.com/JF002/lopy-snippets/tree/master/WS2812. Thanks for your help!
  • Readable WiFi MAC address

    Moved
    1
    2 Votes
    1 Posts
    3k Views
    No one has replied
  • Extension board's PIN

    Moved
    4
    0 Votes
    4 Posts
    4k Views
    L
    With a LoPy updated to 0.9.1.b1 (the only one to succeed of four attempted so far), the GPIO (including IRQs) work better. This sample uses an interrupt to make the LED toggle: import machine led=machine.Pin("G16",machine.Pin.OUT) button=machine.Pin("G17",machine.Pin.IN, pull=machine.Pin.PULL_UP) def handler(button): led.toggle() irq=button.irq(trigger=button.IRQ_FALLING, handler=handler) Note that the button itself will bounce, so this won't reliably toggle just once per press.

Pycom on Twitter