Texas State IEEE / Mbed 2 deprecated R5

Dependencies:   LineSensors mbed

DriveController.h

Committer:
Hypna
Date:
2014-10-16
Revision:
5:f53f06a866e9
Parent:
4:ac6b2e5b240b
Child:
9:01c17b286a99

File content as of revision 5:f53f06a866e9:

#ifndef DRIVECONTROLLER_H
#define DRIVECONTROLLER_H
#include "mbed.h"
#include "LineSensors.h"

class DriveController
{
private:
    PwmOut wheelSpeed1;
    PwmOut wheelSpeed2;
    PwmOut wheelSpeed3;
    PwmOut wheelSpeed4;
    
    DigitalOut wheelDirection1;
    DigitalOut wheelDirection2;
    DigitalOut wheelDirection3;
    DigitalOut wheelDirection4;
    
    I2CSlave i2c;
    
    LineSensors sensors;
    bool sensorStates[8][3];
    
    int command;
    int edge;
    
    void move(char direction = 'F');
    void getCommand();
    void rotate(char direction);
    void sendComplete();
    int calculateError();
    bool intersection();
    
public:
    DriveController();
    void go();
};

#endif