BERTL16 LineDrive

Dependencies:   Serial_HL mbed

Committer:
WelzAlex
Date:
Thu Jan 24 21:06:58 2019 +0000
Revision:
0:68b692bb433c
BERTL16Drive

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WelzAlex 0:68b692bb433c 1 #include "mbed.h"
WelzAlex 0:68b692bb433c 2
WelzAlex 0:68b692bb433c 3
WelzAlex 0:68b692bb433c 4 class dracuMotor
WelzAlex 0:68b692bb433c 5 {
WelzAlex 0:68b692bb433c 6 public:
WelzAlex 0:68b692bb433c 7 dracuMotor(PinName MotorEN, PinName MotorFOR , PinName MotorREV);
WelzAlex 0:68b692bb433c 8 operator float();
WelzAlex 0:68b692bb433c 9 void Speed(float speed);
WelzAlex 0:68b692bb433c 10 private:
WelzAlex 0:68b692bb433c 11 float _speed;
WelzAlex 0:68b692bb433c 12 PwmOut motorEnabled;
WelzAlex 0:68b692bb433c 13 DigitalOut motorForward;
WelzAlex 0:68b692bb433c 14 DigitalOut motorReverse;
WelzAlex 0:68b692bb433c 15
WelzAlex 0:68b692bb433c 16 };
WelzAlex 0:68b692bb433c 17
WelzAlex 0:68b692bb433c 18 class AnalogInHL2 : public AnalogIn {
WelzAlex 0:68b692bb433c 19 public:
WelzAlex 0:68b692bb433c 20 AnalogInHL2(PinName pin) : AnalogIn(pin) {}
WelzAlex 0:68b692bb433c 21 int Read()
WelzAlex 0:68b692bb433c 22 { return read_u16()>>6; }
WelzAlex 0:68b692bb433c 23 };