nowe + funkcje

Dependencies:   Servo

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Engine.h Source File

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