![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
main + engine
Fork of AktalnyCZOSN by
Engine.h
- Committer:
- yruiewyrui3
- Date:
- 2016-06-08
- Revision:
- 2:35dd310320e5
- Parent:
- 0:2294f5ee0610
File content as of revision 2:35dd310320e5:
#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