-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Robert Keen edited this page Oct 29, 2019
·
2 revisions
Method | description | arguments | example |
---|---|---|---|
activate_motor(motor_number, power) | activates specified motor at specified power level (negative power level will make the motor spin in reverse) | arg1: motor number (int) arg2: motor power (int) | set motor 1 to 20%: c.activate_motor(1, 20) |
move_forwards(power) | activates the two side motors to make the vehicle move forwards (negative power to move backwards) | arg1: motor power (-100 to 100 int) | 20% speed forwards: c.move_forwards(20) |
descend(power) | toggles the four corner motors to make the vehicle descend (negative power to assend) | arg1: motor power (-100 to 100 int) | ascend at 20% speed: c.descend(-20) |
rotate(power) | activates the front and back motor for clockwise rotation (negative for counter-clockwise) | arg1: motor power (-100 to 100 int) | rotate counter-clockwise at full speed: c.rotate(-100) |
stop_all() | stops all motors. Note: specific groups of motors can be stopped by running the previous methods with 0 power. | none | stop all motors: c.stop_all() |