Code
In the prior example (version 1), it is very easy to "exceed" the range of motor powers. So this code "divides the rotation by 10" before inputting it into the drive motor function. In this way, this version (version 2) will read the motor from -1000 degrees to 1000 degrees (over 2.5 full turns in either direction).