Arduino {code}racer API
... better know the details.
|
Functions | |
void | CodeRacer::drives_settings (uint8_t drive_left_speed, uint8_t drive_right_speed, unsigned long turn_left_ms, unsigned long turn_right_ms) |
Overwrites some drive settings. This will replace the defaults set by the values in the header file. More... | |
void | CodeRacer::set_drives_stop_left_right () |
Stopps both drives. More... | |
void | CodeRacer::set_drives_states_left_right (drivestate stateleft, drivestate stateright) |
Sets both of the drives to a specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) More... | |
void | CodeRacer::set_drive_left_state (drivestate state) |
Sets the left side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) More... | |
void | CodeRacer::set_drive_right_state (drivestate state) |
Sets the right side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK) More... | |
void | CodeRacer::set_drive_state (drivestate state, uint8_t frwdpin, uint8_t backpin) |
Sets the specified drivestate for the drive connected to the sepecified pins (DRIVESTOP, DRIVEFRWD, DRIVEBACK) More... | |
void | CodeRacer::set_drives_speed_left_right (uint8_t speedleft, uint8_t speedright) |
Sets the speed for both of the drives. More... | |
void | CodeRacer::set_drive_left_speed (uint8_t speed) |
Sets the speed for the left side drive. More... | |
void | CodeRacer::set_drive_right_speed (uint8_t speed) |
Sets the speed for the right side drive. More... | |
void | CodeRacer::set_drive_speed (uint8_t speed, uint8_t enablepin) |
Sets the speed for the drive of the enable pin connected to the specified pin. More... | |
void CodeRacer::drives_settings | ( | uint8_t | drive_left_speed, |
uint8_t | drive_right_speed, | ||
unsigned long | turn_left_for_ms, | ||
unsigned long | turn_right_for_ms | ||
) |
Overwrites some drive settings. This will replace the defaults set by the values in the header file.
drive_left_speed | Speed of the left side drive |
drive_right_speed | Speed of the right side drive |
turn_left_for_ms | Time in ms the racer will turn to the left around its center if turn_left() is called |
turn_right_for_ms | Time in ms the racer will turn to the right around its center if turn_right() is called |
Definition at line 878 of file CodeRacer.cpp.
void CodeRacer::set_drives_stop_left_right | ( | ) |
void CodeRacer::set_drives_states_left_right | ( | drivestate | stateleft, |
drivestate | stateright | ||
) |
Sets both of the drives to a specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK)
stateleft | drivestate to set for the left side drive |
stateright | drivestate to set for the right side drive |
Definition at line 899 of file CodeRacer.cpp.
void CodeRacer::set_drive_left_state | ( | drivestate | state | ) |
Sets the left side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK)
state | drivestate to set for the left side drive |
Definition at line 908 of file CodeRacer.cpp.
void CodeRacer::set_drive_right_state | ( | drivestate | state | ) |
Sets the right side drive to the specified drivestate (DRIVESTOP, DRIVEFRWD, DRIVEBACK)
state | drivestate to set for the right side drive |
Definition at line 916 of file CodeRacer.cpp.
void CodeRacer::set_drive_state | ( | drivestate | state, |
uint8_t | frwdpin, | ||
uint8_t | backpin | ||
) |
Sets the specified drivestate for the drive connected to the sepecified pins (DRIVESTOP, DRIVEFRWD, DRIVEBACK)
state | drivestate to set for the connected drive |
frwdpin | Pin the forward signal of the drive device driver is connected at |
backpin | Pin the backward signal of the drive device driver is connected at |
Definition at line 926 of file CodeRacer.cpp.
void CodeRacer::set_drives_speed_left_right | ( | uint8_t | speedleft, |
uint8_t | speedright | ||
) |
Sets the speed for both of the drives.
The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before
speedleft | speed of the left side drive. 0<=speed<=255 |
speedright | speed of the right side drive. 0<=speed<=255 |
Definition at line 950 of file CodeRacer.cpp.
void CodeRacer::set_drive_left_speed | ( | uint8_t | speed | ) |
Sets the speed for the left side drive.
The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before
speed | speed of the left side drive. 0<=speed<=255 |
Definition at line 961 of file CodeRacer.cpp.
void CodeRacer::set_drive_right_speed | ( | uint8_t | speed | ) |
Sets the speed for the right side drive.
The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before
speed | speed of the right side drive. 0<=speed<=255 |
Definition at line 971 of file CodeRacer.cpp.
void CodeRacer::set_drive_speed | ( | uint8_t | speed, |
uint8_t | enablepin | ||
) |
Sets the speed for the drive of the enable pin connected to the specified pin.
The drive will run with that speed afterwards. The direction of the drive has to be specfied with one of the set_drive_state methods before
speed | speed of the drive. 0<=speed<=255 |
enablepin | Pin the drives device driver enable pin is connected at |
Definition at line 982 of file CodeRacer.cpp.