]> git.piffa.net Git - sketchbook_andrea/blobdiff - libraries/common/common.h
clean up
[sketchbook_andrea] / libraries / common / common.h
index e1b0cf061a58dfca12b9a95e063b7dbf1f0185e9..c9072a15e72732d678e3f5a4dfc2642959e953d2 100644 (file)
@@ -1,24 +1,18 @@
 /*
   Common Class
 
-  Collezione di funzioni e oggetti comuni incontrati durante
-  i vari esercizi.
-
-  Header file
-  Contiene i prototipi delle funzioni e degli oggetti,
-  il codice e' nel fine *.cpp
+  Oggetti comuni
 
 */
 
 #include "Arduino.h"
-#ifndef common_h // Questi cicli IF, gestiti come macro da preprocessor
-#define common_h // fanno si che questo file non venga incluso piu' volte
+#ifndef common_h
+#define common_h
 
 
-/////////////////////////////////////////////
 class RGBLed {
   // Classe rappresentativa di un LED RGB
-  
+  protected:    // Vedi esempio Ereditarieta'
     byte redPin ;
     byte greenPin ;
     byte bluePin ;
@@ -28,6 +22,7 @@ class RGBLed {
 
   public:
     RGBLed (byte pinR, byte pinG, byte pinB) ;
+       void SetColor (byte r, byte g, byte b) ;
        void Red ();
     void Green ();
     void Blue ();
@@ -36,10 +31,8 @@ class RGBLed {
     void White ();
     void Yellow ();
     void Off ();
-       void SetColor (byte r, byte g, byte b) ;
 };
 
-/////////////////////////////////////////////
-void brilla(byte pin, int velocita = 500) ;
+void brilla(byte pin, int velocita = 200) ;
 
 #endif