main + engine

Dependencies:   Servo mbed

Fork of Kola_Servo by Dominik Święch

Engine.h

Committer:
yruiewyrui3
Date:
2016-06-14
Revision:
3:0de9cb065bee
Parent:
0:2294f5ee0610

File content as of revision 3:0de9cb065bee:

#ifndef ENGINE_H
#define ENGINE_H

#include "mbed.h"


class Engine{
  private:
    PwmOut _pwm;
    DigitalOut _fwd;
    DigitalOut _rev;
    
    float getPwm(float val);
    
  public:
    Engine(PinName pwm, PinName fwd, PinName rev): _pwm(pwm), _fwd(fwd), _rev(rev){}
    void move(int speed); // silniki pracuja z okreslona predkoscia (speed ma zakres od -1 do 1)
    void stop();    //hard stop
};


#endif