Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: HCSR04v2 Servo mbed
Fork of STM_read by
Engine.h
- Committer:
- yruiewyrui3
- Date:
- 2016-06-21
- Revision:
- 0:5919ea7b3b90
File content as of revision 0:5919ea7b3b90:
#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