![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Czosnekengine
Engine.h
- Committer:
- yruiewyrui3
- Date:
- 2016-05-18
- Revision:
- 0:a0c8b50a7292
File content as of revision 0:a0c8b50a7292:
#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