digitalsputnik / ApolloFirmware

Micropython software for the Apollo lamps
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

uPython APA animation engine #8

Open KKallas opened 2 years ago

KKallas commented 2 years ago

Interface to 6 pixel apa strip:

KKallas commented 2 years ago

Create APA object with following which would work as follows:

from future Apollo_indicator as APA
apa = APA()
#apa = APA(sck=machine.Pin(26), mosi=machine.Pin(25),pixels=6) 
apa.background=(APA._CENTER_GRAD,color=(30,0,0)) #_FILL, grad is premultiplier as follows(8,32,255,255,32,8)
apa.foreground=(alpha=(0,1,1,0,0,0), color=(0,50,0))
apa.blink=(True,APA._500MS) #also 1000MS and 1500MS avaiable