LineLeader: this class provides PiStorms specific interface for LineLeader-v2 and NXTLineLeader.
More...
LineLeader: this class provides PiStorms specific interface for LineLeader-v2 and NXTLineLeader.
def MsDevices.LineLeader.__init__ |
( |
|
self, |
|
|
|
port, |
|
|
|
address = LL_ADDRESS |
|
) |
| |
Initialize the class with the i2c address of your LineLeader.
- Parameters
-
def MsDevices.LineLeader.average |
( |
|
self | ) |
|
Read the average weighted value of the current line from position from the Lineleader.
- Parameters
-
def MsDevices.LineLeader.Black_Cal |
( |
|
self | ) |
|
Calibrates the black value for the LineLeader.
- Parameters
-
def MsDevices.LineLeader.command |
( |
|
self, |
|
|
|
command |
|
) |
| |
Writes a value to the command register.
- Parameters
-
self | The object pointer. |
command | Value to write to the command register. |
def MsDevices.LineLeader.getKD |
( |
|
self | ) |
|
Read the Kd value from the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getKDfactor |
( |
|
self | ) |
|
Read the Kd factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getKI |
( |
|
self | ) |
|
Read the Ki value from the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getKIfactor |
( |
|
self | ) |
|
Read the Ki factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getKP |
( |
|
self | ) |
|
Read the Kp value from the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getKPfactor |
( |
|
self | ) |
|
Read the Kp factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.getSetPoint |
( |
|
self | ) |
|
Reads the setpoint register.
- Parameters
-
def MsDevices.LineLeader.ReadRaw_Calibrated |
( |
|
self | ) |
|
Reads the eight(8) calibrated light sensor values of the LineLeader.
- Parameters
-
def MsDevices.LineLeader.ReadRaw_Uncalibrated |
( |
|
self | ) |
|
Reads the eight(8) uncalibrated light sensor values of the LineLeader.
- Parameters
-
def MsDevices.LineLeader.result |
( |
|
self | ) |
|
Reads the result of all 8 light sensors form the LineLeader as 1 byte (1 bit for each sensor)
- Parameters
-
def MsDevices.LineLeader.setKD |
( |
|
self | ) |
|
Write the Kd value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setKDfactor |
( |
|
self | ) |
|
Write the Kd factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setKI |
( |
|
self | ) |
|
Write the Ki value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setKIfactor |
( |
|
self | ) |
|
Write the Ki factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setKP |
( |
|
self | ) |
|
Write the Kp value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setKPfactor |
( |
|
self | ) |
|
Write the Kp factor value to the Lineleader.
- Parameters
-
def MsDevices.LineLeader.setSetPoint |
( |
|
self | ) |
|
Writes the Setpoint register.
- Parameters
-
def MsDevices.LineLeader.Sleep |
( |
|
self | ) |
|
Puts to sleep, or turns off the LEDs of the LineLeader.
- Parameters
-
def MsDevices.LineLeader.steering |
( |
|
self | ) |
|
Read the steering value from the Lineleader (add or subtract this value to the motor speed)
- Parameters
-
def MsDevices.LineLeader.Wakeup |
( |
|
self | ) |
|
Wakes up or turns on the LEDs of the LineLeader.
- Parameters
-
def MsDevices.LineLeader.White_Cal |
( |
|
self | ) |
|
Calibrates the white value for the LineLeader.
- Parameters
-
int MsDevices.LineLeader.LL_AVERAGE = 0x43 |
|
static |
Average Register.
Will return a byte value
int MsDevices.LineLeader.LL_RESULT = 0x44 |
|
static |
Steering Register.
Will return a byte value
int MsDevices.LineLeader.LL_STEERING = 0x42 |
|
static |
Steering Register.
Will return a signed byte value
The documentation for this class was generated from the following file:
- PiStorms/sys/MsDevices.py