Shows where the motor is. More...
Classes | |
| class | encoderDriver.Encoder |
| Tells where the motor is at any given time. More... | |
Functions | |
| def | encoderDriver.makeEncoders (prescaler=7, period=0xff) |
| Function to make encoders. More... | |
Shows where the motor is.
Encoder Driver.
This class creates an interface between the Nucleo and the motors. The Encoder has a spoked wheel inside of it that spin with the same angular velocity as the motor. It shines a light through that wheel and two sensors "observe" that light shining through. These two sensors are out of phase by 90 degrees, which means that when we xor the outputs of both sensors on the same timeline, we find the speed of the spoked wheel and therefore the speed of the motor. This class allows the user to create an object that can be used to read that position of the encoder (and therefore the motor). The individual reading is only useful relative to the particular angle the motor was at when it turned on, as that is the set zero point, but collectively multiple readings can be used to tell the speed accurately.
Driver to interface the DC motor encoders with the STM32
| def encoderDriver.makeEncoders | ( | prescaler = 7, |
|
period = 0xff |
|||
| ) |
Function to make encoders.
This function provides all the necessary data and a script to work from that will create and run the encoders as desired by us, the creators.
| prescaler | Scales the time unit |
| period | Number of counts |