Motor Statement
Sets a particular motor's speed to the specified percentage. Only 1 motor can be specified at a time. The Handyboard supports motor numbers 1 to 4. The speed percentage can range from -100 to 100. Any speed outside of that range will be rounded to the closest valid speed.
Syntax
- motor('Motor Number', speed);
Example
- //Use Motors 2 & 4 to turn sharply for 3 seconds.
- void main()
- {
- motor(2,95);
- motor(4,-95);
- sleep(3.0);
- ao();
- }