Flying Pig

Presentation:

 

Video:

 

Code:

call sound.system(-1)#brings it to a specific starting state
call leds.temperature(0,0)
call leds.top(0,0,0)
call leds.circle(0,0,0,0,0,0,0,0)

onevent rc5
if rc5.command == 1 then
call leds.top(16,0,0)
end
if rc5.command == 2 then
motor.right.target= 150
motor.left.target= 150
end
if rc5.command == 3 then
motor.left.target= 150
motor.right.target=0
end
if rc5.command == 4 then
motor.left.target= 0
motor.right.target= 150
end
if rc5.command == 5 then
motor.left.target= -150
motor.right.target= -150
end
if rc5.command== 0 then
motor.left.target= 0
motor.right.target= 0
end

By: Arya and Sydney

Tags: , , , , , , , ,