control of 2 propulsive DC motors and servo, in RF controlled state and autonomous state

Dependents:   aNXPCupCar

Motors_Out.h

Committer:
pkolar1
Date:
2018-12-19
Revision:
3:8a5c76437c38
Parent:
2:a5effe31eec0

File content as of revision 3:8a5c76437c38:

#ifndef MOTORS_OUT_H
#define MOTORS_OUT_H
#include "mbed.h"

class Motors_Out    //handling 2 modes depending on call
{                   //remote control and autonoums drive
public:
    Motors_Out(PinName pwm1, PinName pwm2, PinName pwm3, PinName pwm4, PinName pwms, PinName en);
    void init();
    void caller();
    void manualInfo(int a);
    void selfDrive(int path);
    void DCSpeed();
    void servoAim();
    void autonomous();
    void servoSig();
    
private:
    PwmOut DC_A1,DC_A2,DC_B1,DC_B2,SERVO;
    DigitalOut H_ENABLE;
    int dir,aim,spd,dir1,aim1,spd1,angle;
    float serv;
    bool self_drive,on;
    Timeout timeout;
    Ticker t;
};
#endif