Oh I love the idea. Now I am thinking of making a valentine’s day hearts that are internet-linked.
DUELink<->HeartLink!!
By the way, you can use DUELink console with your tree. It is still beta and not very stable but it is useable.
https://console.duelink.com/
list
# l light level
# i index of LED
# r,g,b LED color
# q Randomizer of 0 and 1
# k counter to slow thigns down
# x jingle counter
# a[] led data
# m[] jingle notes/timing
Setup()
Loop()
@Setup
# Leds data
Dim a[4+26*4+4]
a[4+26*4+0]=0xff
a[4+26*4+1]=0xff
a[4+26*4+2]=0xff
a[4+26*4+3]=0xff
Dim m[35*2]=[330,200,
0,30,
330,200,
0,30,
330,300,
0,100,
330,200,
0,30,
330,200,
0,30,
330,300,
0,100,
330,200,
392,200,
262,300,
294,100,
330,400,
0,400,
349,200,
349,200,
349,300,
0, 0,
349, 100,
349, 200,
330, 200,
330, 200,
0, 0,
330, 100,
330, 100,
392, 200,
392, 200,
349, 200,
294, 200,
262, 400,
0,400]
led(900,100,0) # stat LED
l=10 # fixed light level
s = 50 # star level
d = 1 # star delta
Melody(17, m, 0, 35*2)
btnEnable(18)
return
@Random
q = Rnd(100)
if(q>50)
q=1
else
q=0
end
return
@loop
k=k+1
if k%200 = 1
RndLED()
end
# star fade
r=s;g=s;b=s
i=3;SetLED()
i=10;SetLED()
s=s+d
if s>200 || s<10
d=d*-1 # go back!
end
ShwLED()
if btndown(18) = 1 # press button to jingle
Melody(17, m, 0, 35*2)
end
goto loop
@RndLED
for i=0 to 26 # 26 leds
Random();r=q*50
Random();g=q*50
Random();b=q*50
SetLED()
next
return
@SetLED
a[i*4+4+0] = 0xE0 | l
a[i*4+4+1] = b
a[i*4+4+2] = g
a[i*4+4+3] = r
return
@ShwLED
spibytes(a,0,(4+26*4+4))
return
Much has changed on the firmware. We will share a firmware update later but you can start playing with DUELink scripts today!