Stage-1 Students SoCEM / Mbed 2 deprecated ROCO104_base_Template

Dependencies:   mbed motor

motor.h

Committer:
martinsimpson
Date:
2018-12-14
Revision:
1:3ca91ad8e927
Parent:
0:51c12cc34baf
Child:
2:bc41daf2b0ce

File content as of revision 1:3ca91ad8e927:

#ifndef _MOTOR_H_
#define _MOTOR_H_
#include "mbed.h"
class Motor
{
public:
    Motor(PinName pinName1, PinName pinName2, PinName pinName3, PinName pinName4);
    void Fwd(float time);
    void Rev(float time);
    void Stop(void);
    int Speed(float speedA, float speedB);
    void Period_in_ms(int msPeriod);
private:
    PwmOut pin1;
    PwmOut pin2;
    PwmOut pin3;
    PwmOut pin4;
};

//int motor(float speedA, float speedB);

#endif