MIDI Elements
Library to simplify handling of components for MIDI controllers
 All Classes Files Functions Variables Macros
Led.h
Go to the documentation of this file.
1 // MIDI Elements LED class
2 // Library to simplify handling of components for MIDI controllers
3 // Created by Tomash Ghz
4 // www.tomashg.com
5 // ghz.tomash@gmail.com
6 
7 #ifndef Led_H
8 #define Led_H
9 
10 //-----------------------------------------------------------------------------------
11 #include "WProgram.h" //It is very important to remember this! note that if you are using Arduino 1.0 IDE, change "WProgram.h" to "Arduino.h"
12 
17 class Led {
18 private:
19  byte pin;
20  byte channel;
21  byte number;
22  bool pwm;
23  bool state;
24 public:
25  Led(byte p);
26  Led(byte p, byte c, byte n);
27  Led(byte p, byte c, byte n, bool a);
28  ~Led(); // destructor
29  void setOn(byte c, byte n, byte v);
30  void setOff(byte c, byte n, byte v);
31  void setOnSilent(byte c, byte n, byte v);
32  void setOffSilent(byte c, byte n, byte v);
33  void set(bool s);
34  void set();
35 };
36 //-----------------------------------------------------------------------------------
37 
38 #endif
void setOffSilent(byte c, byte n, byte v)
read the values for note off, but do not update the led state.
Definition: Led.cpp:69
~Led()
Definition: Led.cpp:30
Class for handling single color LEDs.
Definition: Led.h:17
void setOnSilent(byte c, byte n, byte v)
read the values for note on and cc, but do not update the led state. (used for banked LEDs)...
Definition: Led.cpp:56
void set()
manually update the LED to the set state (used for banked LEDs)
Definition: Led.cpp:79
Led(byte p)
constructor with pin number.
Definition: Led.cpp:11
void setOn(byte c, byte n, byte v)
read the values for note on and cc and update the led state. if the passed channel and number match t...
Definition: Led.cpp:33
void setOff(byte c, byte n, byte v)
read the values for note off and update the led state.
Definition: Led.cpp:49