1
Prototype Summer School Programming the MBot to spin Spin for 2 seconds, then stop. Spin for 5 seconds, then repeat. Tests if it is within the rst 2 seconds Sets speed of motors left (M1) = backwards right (M2) = forwards Tests if it is within the rst 5 seconds Tests if 2 seconds has passed Sets speed of motors to 0 Resets the timer Sets speed of motors left (M1) = backwards right (M2) = forwards

Prototype Summer School 2016: Program an MBot robot to spin

Embed Size (px)

Citation preview

Page 1: Prototype Summer School 2016: Program an MBot robot to spin

Prototype Summer SchoolProgramming the MBot to spin

Spin for 2 seconds,then stop.

Spin for 5 seconds,then repeat.

Tests if it is withinthe first 2 seconds

Sets speed of motorsleft (M1) = backwardsright (M2) = forwards

Tests if it is within thefirst 5 seconds

Tests if 2seconds haspassed

Sets speed of motors to 0

Resets the timer

Sets speed of motorsleft (M1) = backwardsright (M2) = forwards