Class org.bluemelon.bluesense.StepperDevice

Description

Class for communicating with a stepper driver device.

Method Index

new StepperDevice()
requestSetConfiguration(), requestSetSpeed()

Inherited from Device

Constructor Detail

StepperDevice

function StepperDevice(master:Master, deviceId:Number)

This constructor creates a new object for communicating with a motor driver device.

Parameters

mastercontains a pointer to the master object, see Master.
deviceIdis the unique device identifier which you can find on the board or using the Master.requestDeviceTable method of the Master.

Method Detail

requestSetSpeed

function requestSetSpeed(speed:Number)

Change the speed

Parameters

speedspecifies the speed, it should be between -127 to 127, negative means turning backwards.

requestSetConfiguration

function requestSetConfiguration(current:Number, autostop:Number, halfStep:Number, waveDrive:Number, fastDecay:Number)

Set configuration

Parameters

currentspecificies the current in miliAmperes between 0 and 1500.
autostop1--> the motor is automatically stopped when the limit switch is enabled
waveDrive1--> wave drive enabled (noise reduction), 0--> wave drive disabled
fastDecay1--> fast decay enabled, 0 --> normal decay