-
Notifications
You must be signed in to change notification settings - Fork 0
Using the Motor Class
Benjamin Bussell edited this page Sep 16, 2019
·
2 revisions
The initialization of a Motor object requires a serial connection to be passed as a parameter. The required baud rate is 11520
import Motor
motor_Object = Motor(serial.Serial('COM3', 11520, timeout=0.1)The class works by opening up a side thread that is constantly sending the defined current to the FSESC. To open this thread call the method .run()
import Motor
motor_Object = Motor(serial.Serial('COM3', 11520, timeout=0.1)
motor_Object.run()If necessary the method can return the thread where you can then perform thread operations, maybe not sure how this would work without having called the threading library.
This class stops the thread from looping