Search found 2 matches

by razanur
Sun Nov 03, 2019 5:17 pm
Forum: MicroPython pyboard
Topic: pboard controlling WS2801 ledstrip over SPI
Replies: 3
Views: 6511

Re: pboard controlling WS2801 ledstrip over SPI

Also, you'll probably have to cheat to get to the 5V logic level: https://hackaday.com/2017/01/20/cheatin ... -data-line
by razanur
Sun Nov 03, 2019 5:15 pm
Forum: MicroPython pyboard
Topic: pboard controlling WS2801 ledstrip over SPI
Replies: 3
Views: 6511

Re: pboard controlling WS2801 ledstrip over SPI

Works pretty much out of the box. I wrote this code for mine: N_LED = const(100) DEFAULT_COLOR = {'r': 0xff, 'g': 0xA0, 'b': 0xA0} class WS2801: def __init__(self, num_led, spi): self.NUM_LED = num_led self._databuffer = bytearray(3*num_led) self._spi = spi # Check if baud frequency adequate. def se...