![]() |
Fun with PWM
0.32
|
Stepper Motor abstraction. More...
Public Member Functions | |
def | __init__ (self, index=None) |
def | resetData (self) |
def | reload (self) |
def | getOutputOrder (self, asList=False) |
def | setZeroAngle (self) |
def | moveToAngle (self, newAngle=0) |
def | moveByAngle (self, newAngle=0) |
def | updateDriveState (self) |
def | stop (self) |
def | save (self) |
def | joystickCallback (self, dev_num, signal, number, name, value, init) |
def | keyboardCallback (self, hex, ascii) |
![]() | |
def | __init__ (self, index=None) |
def | resetData (self) |
def | reload (self) |
def | addCallback (self, name, func) |
def | removeCallback (self, name) |
def | hasCallback (self, name) |
def | doCallbacks (self) |
def | start (self) |
def | stop (self) |
def | save (self) |
def | setDriveState (self, driveState=0) |
def | updateDriveState (self) |
def | simulateKeyUp (self) |
def | updateShadowState (self) |
def | initControllers (self) |
def | hasControllers (self) |
def | newController (self, controllerType='joystick') |
def | updateController (self, controller, controllerType='joystick') |
def | hasController (self, controllerType, ident) |
def | removeController (self, controllerType, ident) |
def | joystickCallback (self, dev_num, signal, number, name, value, init) |
def | keyboardCallback (self, hex, ascii) |
![]() | |
def | __init__ (self, index=None, autoload=True) |
def | reload (self) |
def | save (self) |
def | delete (self) |
def | blobExists (self) |
def | getModulePath (self) |
def | getTypePath (self) |
def | getRowPath (self) |
def | getRowFileName (self) |
Public Attributes | |
stage | |
angle | |
target | |
outputOrders | |
sequences | |
enabled | |
normalizeAngle | |
minTime | |
outputOrder | |
sequence | |
sequenceLength | |
pins | |
acceleration | |
controllers | |
shadowState | |
![]() | |
jsonData | |
now | |
shadowState | |
driveTypes | |
pwm | |
scheduler | |
kbthread | |
last | |
running | |
controllersEnabled | |
driveType | |
pins | |
enabled | |
acceleration | |
controllers | |
driveState | |
joystickRegistry | |
![]() | |
jbModule | |
jbType | |
jbIndex | |
jsonData | |
Additional Inherited Members | |
![]() | |
def | CleanupGpio () |
![]() | |
def | reindex (force=False) |
def | find (jbModule, jbType, jbIndex) |
def | all (jbModule=None, jbType=None) |
def | hydrate (jbModule=None, jbType=None, ids=[]) |
![]() | |
basepath = os.path.join(AmsEnvironment.FilePath(), 'jsonblob') | |
indexpath = os.path.join(basepath, 'index.json') | |
dictionary | constructors = {} |
bool | indexexists = False |
bool | indexed = False |
dictionary | index = {} |
Stepper Motor abstraction.
def Motors.StepperMotor.__init__ | ( | self, | |
index = None |
|||
) |
Initializes the StepperMotor object @param index
def Motors.StepperMotor.getOutputOrder | ( | self, | |
asList = False |
|||
) |
gets the current output order
def Motors.StepperMotor.joystickCallback | ( | self, | |
dev_num, | |||
signal, | |||
number, | |||
name, | |||
value, | |||
init | |||
) |
move the motor to the specified angle
def Motors.StepperMotor.keyboardCallback | ( | self, | |
hex, | |||
ascii | |||
) |
perform keyboard callback
def Motors.StepperMotor.moveByAngle | ( | self, | |
newAngle = 0 |
|||
) |
move the motor by the specified angle
def Motors.StepperMotor.moveToAngle | ( | self, | |
newAngle = 0 |
|||
) |
move the motor to the specified angle
def Motors.StepperMotor.reload | ( | self | ) |
override - sync object with saved data
def Motors.StepperMotor.save | ( | self | ) |
override - saves stepper specific attributes
def Motors.StepperMotor.setZeroAngle | ( | self | ) |
assigns 0 angle to the current motor position
def Motors.StepperMotor.stop | ( | self | ) |
override - also calls save for the current angle
def Motors.StepperMotor.updateDriveState | ( | self | ) |
update drive state called from scheduled task (runs on it's own thread) stops stepper motor if no changes have been sent in the last 10 seconds delays steps based on rpm and steps per rev if a target is provided, move toward it otherwise use drive state to determine speed