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

Dependencies:   mbed UniServ

Brobot.h

Committer:
obrie829
Date:
2017-05-26
Revision:
0:eba74e7a229b
Child:
8:351b0b7b05b2

File content as of revision 0:eba74e7a229b:

/*
 * Brobot.h
 *
 */

#ifndef BROBOT_H_
#define BROBOT_H_

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

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

public:
    // constructors have same name as the class
    Brobot(PwmOut* left, PwmOut* right, 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;
};

#endif /* BROBOT_H_ */