Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Control/drivecontrol.h
- Committer:
- kolanery
- Date:
- 2017-05-06
- Revision:
- 0:cb667de3a336
- Child:
- 2:619b02232144
File content as of revision 0:cb667de3a336:
#ifndef __DRIVE_CONTROL_H__ #define __DRIVE_CONTROL_H__ #include "motor.h" /** * Control mouse movements. * - PID Control based on sensor readings. * - Output PWM signals to motors based on feedback loop. * - Provides directional signals to the main control loop. */ class DriveControl { public: int y; int x; DriveControl (int start_x, int start_y); ~DriveControl(); int get_next_direction(); int get_next_state(int state); // Stops both motors. Assume no coasting. void stop(); void drive_one_forward(); void turn(); void turn_left(); void turn_right(); bool has_front_wall(); bool has_right_wall(); bool has_left_wall(); }; #endif