These are the core files for the Robot at Team conception.

Dependencies:   mbed UniServ

Brobot.h

Committer:
obrie829
Date:
2017-05-29
Revision:
8:351b0b7b05b2
Parent:
0:eba74e7a229b
Child:
11:05d5539141c8
Child:
15:4efc66de795a

File content as of revision 8:351b0b7b05b2:

/*
 * Brobot.h
 *
 */

#ifndef BROBOT_H_
#define BROBOT_H_

#include <cstdlib>
#include <mbed.h>
#include "SpeedControl.h"

/**
 * This is a device driver class to drive the robot autonomously
 */
class Brobot
{

public:
    // constructors have same name as the class
    Brobot(SpeedControl* speedctrl, int number);
    //Brobot();  //empty constructor
    

 //   void        init(PwmOut* left, PwmOut* right, int number);
    void        turnleft();
    void        turnright();
    void        forward();
    void        back();
    void        stop();
    void        slow(float ammount);  // ammount is subtracted from current speeds
    void        rotate(float ammount); // values from -0.5 to 0.5
    
private:
    PwmOut*     pwmL;
    PwmOut*     pwmR;
    int         number;
    SpeedControl* speedctrl;
};

#endif /* BROBOT_H_ */