Shop OBEX P1 Docs P2 Docs Learn Events
Updated OBEX Driver for WS2812B — Parallax Forums

Updated OBEX Driver for WS2812B

JDJD Posts: 570
edited 2020-03-04 06:51 in Propeller 1
I got a tip from JonnyMac himself on his latest and greatest WS2812 driver that includes a function called Morphing and wanted to share it with everyone. It allows you to change from a specific color to another. He uploaded today (4/30/18) and I suggest anyone using the WS2812 module to download this version and replace what you have.

The current version has a new method called morph() that lets you transition from one color to another. Here's how you might use it:
  repeat phase from 0 to 255                                    ' control transition
    newcolor := strip.morph($FF000000, $0000FF00, phase)        ' morph from red to blue
    strip.set_all(newcolor)
    time.pause(4)

Thanks again, JonnyMac for your great work on creating a driver for this cool module; this is WAY better than my approach. Toast to you.

Link to the OBEX updated driver: Pixel Driver (WS28xx / SK68xx)
Sign In or Register to comment.