]> git.piffa.net Git - sketchbook_andrea/blobdiff - libraries/common/common.h
RGB common anodo
[sketchbook_andrea] / libraries / common / common.h
index c5ad5d567c7301082c6b374721bcea1313c49dc0..0af9d453d46a0c49f75fc3ca3c06b15d6e756e58 100644 (file)
@@ -43,9 +43,11 @@ class RGBLed {
     byte redValue ;
     byte greenValue ;
     byte blueValue ;
+    byte common ;
 
   public:
     RGBLed (byte pinR, byte pinG, byte pinB) ;
+    RGBLed (byte pinR, byte pinG, byte pinB, byte com) ;
        void SetColor (byte r, byte g, byte b) ;
        void Red ();
     void Green ();
@@ -100,6 +102,40 @@ public:
     byte brightness  ;      // luminostia' iniziale
 };
 
+
+
+////////////////////////////
+class Sequenza {
+    // Lampeggia LED in sequenza utilizzando millis()
+    unsigned long previousMillis ;
+    byte i = 0;
+    byte *ledPins;
+    byte size;
+    int inc = 1;
+    long interval;
+    
+  public:
+    Sequenza (byte passed[], byte dim) ; // Array contentente i PINS, dimensioni array
+    void Update(long value) ;  // Accende in sequenza
+    void Reverse(long value) ; // Invertita
+    void UD(long value) ; // Up & Down
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 //////////////////////
 // Funzioni