]> git.piffa.net Git - sketchbook_andrea/blob - libraries/common/common.h
c9072a15e72732d678e3f5a4dfc2642959e953d2
[sketchbook_andrea] / libraries / common / common.h
1 /*
2   Common Class
3
4   Oggetti comuni
5
6 */
7
8 #include "Arduino.h"
9 #ifndef common_h
10 #define common_h
11
12
13 class RGBLed {
14   // Classe rappresentativa di un LED RGB
15   protected:    // Vedi esempio Ereditarieta'
16     byte redPin ;
17     byte greenPin ;
18     byte bluePin ;
19     byte redValue ;
20     byte greenValue ;
21     byte blueValue ;
22
23   public:
24     RGBLed (byte pinR, byte pinG, byte pinB) ;
25         void SetColor (byte r, byte g, byte b) ;
26         void Red ();
27     void Green ();
28     void Blue ();
29     void Magenta ();
30     void Cyano ();
31     void White ();
32     void Yellow ();
33     void Off ();
34 };
35
36 void brilla(byte pin, int velocita = 200) ;
37
38 #endif