|
final project
1
|
control the robot's movement and direction More...
#include "main.h"Go to the source code of this file.
Functions | |
| void | turn_right (oi_t *sensor, int degrees) |
| Turns the robot right. More... | |
| void | turn_left (oi_t *sensor, int degrees) |
| Turns the robot left. More... | |
| short | move_back (oi_t *sensor, short cm) |
| Moves the robot back. More... | |
| short | move_forward (oi_t *sensor, short cm) |
| Moves the robot forward. More... | |
| void | stopmoving () |
| Stops robot from moving. More... | |
Variables | |
| short | speed = 150 |
| short | turnSpeed = 150 |
| float | turnScalar = 5 |
| float | distScalar = 2.5 |
| char | sumData [3] |
| float | sum = 0 |
| short | ret = 0 |
| char | bumpL = 0 |
| char | bumpR = 0 |
control the robot's movement and direction
also detects bumper sensors and calls the ground detect sensors
Definition in file drive.c.
| short move_back | ( | oi_t * | sensor, |
| short | cm | ||
| ) |
| short move_forward | ( | oi_t * | sensor, |
| short | cm | ||
| ) |
| void stopmoving | ( | ) |
| void turn_left | ( | oi_t * | sensor, |
| int | degrees | ||
| ) |