Wrapper for this library: https://github.com/adafruit/Adafruit_NeoPixel
Library for controlling single-wire-based LED pixels and strip.
Example:
Library for controlling single-wire-based LED pixels and strip.
Example:
B4X:
Sub Process_Globals
Public Serial1 As Serial
Private pixel As AdafruitNeoPixel
Private timer1 As Timer
Private n As Int
End Sub
Private Sub AppStart
Serial1.Initialize(115200)
Log("AppStart")
pixel.Initialize(16, 6, pixel.NEO_GRB)
timer1.Initialize("timer1_Tick", 500)
timer1.Enabled = True
End Sub
Sub Timer1_Tick
n = (n + 1) Mod 16
pixel.SetPixelColor(n, 0, 150, 0)
pixel.Show
End Sub
Attachments
Last edited: