In the morning you fill the healthy fridge with healthy foods for the day, then whenever you want a snack you press a button on your remote and the healthy fridge will give you a snack.
Presentation:
Video:
Code:
call sound.system(-1)
call leds.top(0,0,0)
call leds.bottom.left(0,0,0)
call leds.bottom.right(0,0,0)
call leds.circle(0,0,0,0,0,0,0,0)
onevent prox
if prox.horizontal[2] > 500 then
motor.left.target = 0
motor.right.target = 0
end
onevent rc5
if rc5.command == 2 then
motor.left.target = 500
motor.right.target = 500
end
if rc5.command ==5 then
motor.left.target =0
motor.right.target = 0
end
if rc5.command == 6 then
motor.left.target = 500
motor.right.target = 0
end
if rc5.command == 8 then
motor.left.target = -500
motor.right.target = -500
end
if rc5.command == 4 then
motor.left.target = 0
motor.right.target = 500
end
if rc5.command == 1 then
call leds.bottom.right(0,32,0)
call leds.bottom.left(0,32,0)
call leds.top(30,2,1)
end