Spectacle lumineux avec Thymio II
Cette démonstration a été développée par Jules Martinet au Gymnase Auguste Piccard, Lausanne.
La démonstration utilise tous les LEDs du Thymio II avec un séquencement spécifique. Les trois robots dans la vidéos étaient branchés à trois ordinateurs et démarrés en même temps à la main….
Voici quelques images des robots pendant la démonstration:
Voici le code qui a été utilisé:
var etat=0
onevent buttons
etat=(etat+1)%36
if etat==0 then
call leds.circle(0,0,0,0,0,0,0,0)
end
if etat==1 then
call leds.top(0,0,0)
end
if etat==2 then
call leds.bottom.left(0,0,0)
end
if etat==3 then
call leds.bottom.right(0,0,0)
end
if etat==4 then
call leds.buttons(0,0,0,0)
end
if etat==5 then
call leds.prox.h(0,0,0,0,0,0,0,0)
end
if etat==6 then
call leds.prox.v(0,0)
end
if etat==7 then
call leds.rc(0)
end
if etat==8 then
call leds.sound(0)
end
if etat==9 then
call leds.temperature(0,0)
end
if etat==10 then
call leds.top (32,0,0)
end
if etat==11 then
call leds.top(0,32,0)
end
if etat==12 then
call leds.top (0,0,32)
end
if etat==13 then
call leds.bottom.right(32,32,0)
end
if etat==14 then
call leds.circle(1,0,0,0,0,0,0,0)
end
if etat==15 then
call leds.circle(1,4,0,0,0,0,0,0)
end
if etat==16 then
call leds.circle(1,4,8,0,0,0,0,0)
end
if etat==17 then
call leds.circle(1,4,8,16,0,0,0,0)
end
if etat==18 then
call leds.circle(1,4,8,16,24,0,0,0)
end
if etat==19 then
call leds.circle(1,4,8,16,24,32,0,0)
end
if etat==20 then
call leds.circle(1,4,8,16,24,32,32,0)
end
if etat==21 then
call leds.circle(1,4,8,16,24,32,32,32)
end
if etat==22 then
call leds.bottom.left(0,0,32)
end
if etat==23 then
call leds.buttons(32,0,0,0)
end
if etat ==24 then
call leds.buttons(32,32,0,0)
end
if etat==25 then
call leds.buttons(32,32,32,0)
end
if etat==26 then
call leds.buttons(32,32,32,32)
end
if etat==27 then
call leds.sound(32)
end
if etat==28 then
call leds.prox.h(0,0,0,0,0,0,0,32)
end
if etat==29 then
call leds.prox.h(0,0,0,0,0,0,32,32)
end
if etat==30 then
call leds.prox.h(32,0,0,0,0,0,32,32)
end
if etat==31 then
call leds.prox.h(32,0,0,0,0,32,32,32)
end
if etat==32 then
call leds.prox.h(32,32,0,0,0,32,32,32)
end
if etat==33 then
call leds.prox.h(32,32,0,0,32,32,32,32)
end
if etat==34 then
call leds.prox.h(32,32,32,0,32,32,32,32)
end
if etat==35 then
call leds.prox.h(32,32,32,32,32,32,32,32)
end