X-Git-Url: http://git.piffa.net/web?p=rover;a=blobdiff_plain;f=libraries%2Frover%2Frover.h;fp=libraries%2Frover%2Frover.h;h=13e1be3a8b8572719bf65e3ec136a64379b0fa18;hp=acde54fcf86c59cc804a688e58a8c67044f23972;hb=844b3ebfdfaa336494408f921342c04627cba065;hpb=ead54f309e696c5befa132582375f54dd97b8b10 diff --git a/libraries/rover/rover.h b/libraries/rover/rover.h index acde54f..13e1be3 100644 --- a/libraries/rover/rover.h +++ b/libraries/rover/rover.h @@ -13,41 +13,17 @@ Licenza: GPLv3 #ifndef rover_h #define rover_h -////////////////////// -// OBJ - - -class engine { -// Gestione di un singolo motore -private: - byte enablePIN1; - byte enablePIN2; - byte min; // Minimo per partire - byte val; // 8bit PWM - -public: - Engine (byte PIN1, byte PIN2, byte PINPWM); - void Forward (); - void Backward (); - void SetSpeed (); // imposta un valore preciso per il PWM - -} - -class motors { -// classe composta da due engines -// Composition is better than inheritance here - -public: - motors (engine enginesx, engine enginedx) { - void Forward (); - void Backward (); - void TurnLeft (); - void TurnRight (); - void TurnU (); -} -} -////////////////////// +// Global vars + + // Funzioni +void abilita() ; +void forwardA() ; +void backwardA() ; +void stopA() ; +void forwardB() ; +void backwardB() ; +void stopB() ; #endif