the fish that looks like a jet

Dependencies:   ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo

motor_controller.h

Committer:
sandwich
Date:
2014-01-21
Revision:
0:ff9bc5f69c57
Child:
6:a4d6f3e4bf28

File content as of revision 0:ff9bc5f69c57:

#pragma once
#include "mbed.h"

class PololuMController
{
    private:
    PwmOut* pwm;
    DigitalOut* outA;
    DigitalOut* outB;
    float timestamp;
    public:
    PololuMController();
    PololuMController(PinName pwmport, PinName A, PinName B);
    ~PololuMController();
    void setspeed(float speed);         //0 to 1
    void setpolarspeed(float speed);    //-1 to 1
    void reverse();                     //only works on non-polar speed
    void drive_sinusoidal(float cur_time, float a, float w, float phi); //a*sin(w*cur_time+phi)
};