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
00001 #ifndef ENGINE_H 00002 #define ENGINE_H 00003 00004 #include "mbed.h" 00005 00006 00007 class Engine{ 00008 private: 00009 PwmOut _pwm; 00010 DigitalOut _fwd; 00011 DigitalOut _rev; 00012 00013 float getPwm(float val); 00014 00015 public: 00016 Engine(PinName pwm, PinName fwd, PinName rev): _pwm(pwm), _fwd(fwd), _rev(rev){} 00017 void move(int speed); // silniki pracuja z okreslona predkoscia (speed ma zakres od -1 do 1) 00018 void stop(); //hard stop 00019 }; 00020 00021 00022 #endif
Generated on Tue Jul 12 2022 21:03:38 by
1.7.2
