Library for the Seeed Studio Shield Bot
SeeedStudioShieldBot.h
- Committer:
- melse
- Date:
- 2013-07-15
- Revision:
- 0:227158f56a11
- Child:
- 1:5c40f2a5e1ac
File content as of revision 0:227158f56a11:
#include "mbed.h" class SeeedStudioShieldBot { public: // Create a shield bot object, using default settings for now... SeeedStudioShieldBot(); void left_motor(float speed); void right_motor(float speed); // Like the two above, but both at the same speed. // Negative of either will do the same job as the other (hopefully...) void forward(float speed); void backward(float speed); // This will rotate both of the motors in opposite directions, at the same speed void left(float speed); void right(float speed); void disable_motor_a(); void disable_motor_b(); void enable_motor_a(); void enable_motor_b(); void stopAll(); // Need to do something to do with detected line... float get_sensors_overall_value(); DigitalIn rightSensor; DigitalIn inRightSensor; DigitalIn centreSensor; DigitalIn inLeftSensor; DigitalIn leftSensor; private: PwmOut motor1A; DigitalOut motor1B; DigitalOut motor1En; // motor2A or motor2B need to be PWM, but the freedom board doesn't support it at the moment... PwmOut motor2A; DigitalOut motor2B; DigitalOut motor2En; };