C Control PRO-BOT128 + C-Control PRO 128 Unit + Voltcraft® USB programming cable Kit 190406 User Manual

Product codes
190406
Page of 56
45
READ_LINE_RIGHT() as word
Returns the analog value of the right line sensor (0 to 1023).
LINE_LED_ON()
Turns the LED of the line sensor on.
LINE_LED_OFF()
Turns the LED of the line sensor off.
AKKU_SPG() as single
Returns the rechargeable or normal battery voltage.
GET_ADC(channel as byte) as word
Read out any ADC channel (channel 0 to 7).
DRIVE_INIT()
Initialises the drive. Prior to using the drive, you have to call up this routine.
DRIVE_ON()
Sets the enable input of the L293D to high. The drive is activated.
DRIVE_OFF()
Sets the enable input of the L293 to low. The drive is deactivated.
DRIVE(left as byte, right as byte)
Timer1 PWM for the drive:
values between 1 to 128 = backwards
values between 128 to 255 = forwards
Value 128 = drive stop
Motor_POWER(left as byte, right as byte)
Speed, values between 1 and 255
You first have to state the direction with MOTOR_DIR.
MOTOR_DIR(left as byte, right as byte)
States the rotation direction of the motors for the function MOTOR_POWER.
1 = forwards
0 = backwards
MOTOR_STOP()
Motor is stopped, PWM is set to 128.
GO_TURN(distance as integer, degree as integer, speed as byte)
Lets the PRO-BOT128 drive into a defined direction.
"Distance" in cm (+ = forwards ; - = backwards)
"Degree" in degree (+ = right turn; - = left turn)
"Speed" 1 to 255