]> git.piffa.net Git - rover/blobdiff - libraries/rover/rover.h
Sistemati gli include della lib Servo.h
[rover] / libraries / rover / rover.h
index acde54fcf86c59cc804a688e58a8c67044f23972..ce72cdbfecb6524dc0ae1640b0f3dc90d3d4f8da 100644 (file)
@@ -9,45 +9,29 @@ Licenza:    GPLv3
 */
 
 #include "Arduino.h"
+#include "Servo.h" 
 
 #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 ();
-}
-}
-//////////////////////
-// Funzioni
+// Global vars
+
 
+// Funzioni
 
+void abilita() ;
+void forwardA(); // speedA e' dato dalla variabile golabale speedA
+void forwardA(byte speedA); // Overloading
+void backwardA() ;
+void backwardA(byte speedA) ;
+void stopA() ;
+void forwardB() ;
+void forwardB(byte speedB) ;
+void backwardB() ;
+void backwardB(byte speedB) ;
+void stopB() ;
+
+void turnDX() ;
+void turnSX() ;
+void turnMiddle() ;
 #endif