nowe + funkcje
Embed:
(wiki syntax)
Show/hide line numbers
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 Thu Jul 14 2022 18:20:21 by 1.7.2