Description:
Here are some new and fun patterns created by our students. Look below for the code.
Fun tip: Make colorful by changing out the marker as the robot drives along!
Projects:
1) Ashna’s Summer Star:
call sound.system(-1)
call leds.temperature(0,0)
call leds.top(0,0,0)
call leds.circle(0,0,0,0,0,0,0,0)
onevent buttons
if button.forward == 1 then
call leds.top(32,32,0)
end
if button.right == 1 then
call leds.top(0,32,32)
end
onevent prox
if button.backward == 1 then
motor.left.target = 0
motor.right.target = 0
end
onevent rc5
if rc5.command == 1 then
call leds.top (32,0,0)
end
if rc5.command == 2 then
call leds.top(32,0,0)
end
if rc5.command == 3 then
motor.left.target = 300
motor.right.target = 300
end
if rc5.command == 8 then
motor.left.target = 0
motor.right.target = 0
end
if rc5.command == 6 then
motor.left.target = 250
motor.right.target = 0
end
if rc5.command == 4 then
motor.left.target =0
motor.right.target =250
end
if rc5.command == 9 then
motor.left.target = -300
motor.right.target = -300
end
if rc5.command == 7 then
call leds.circle(32,32,32,32,32,32,32,32)
end
onevent mic
if mic.intensity > 24 then
motor.left.target = 0
motor.right.target = 0
end
2) Brynn's Octo-Circles (You'll love this very creative one!)
var itera = 0
var speed = 49
onevent temperature
itera = itera + 1
if itera==1 then
motor.left.target = 500
motor.right.target = -199
end
if itera==4 then
motor.left.target = speed
motor.right.target = speed
speed = speed + 2
end
if itera==7 then
itera = 0
end
3) Thymio Fireworks
var itera = 0
var speed = 20
onevent temperature
itera = itera + 1
if itera==1 then
motor.left.target = 140
motor.right.target = -140
end
if itera==4 then
motor.left.target = speed
motor.right.target = speed
speed = speed + 2
end
if itera==7 then
itera = 0
4) Mystery Pattern
Code:
[wpdm_file id=11]