Austin Suszek / Mbed 2 deprecated MIDISynthesizer

Dependencies:   mbed USBDevice PinDetect

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers LEDController.h Source File

LEDController.h

00001 
00002 #include "mbed.h"
00003 
00004 class LEDController{
00005 public:
00006     
00007     /*
00008      * Identifies what note was passed in and passes this information along to chooseLEDForNote.
00009      * @param key The integer representation of the note
00010      * @param type This integer determines whether the event coming in is an "on" or "off" event
00011      */
00012     void identifyKeyForLed(int key, int type);
00013 
00014 private:    
00015     /*
00016      * Finds an available LED to light up or turn off depending on the type param.
00017      * @param key[] This is the notes information such as the numerical key value and RGB values.
00018      * @param type This integer determines whether the event coming in is an "on" or "off" event.
00019      * @param signature Determines whether the note is sharp or not
00020      */
00021     void chooseLedForKey(int colors[3], int type, int signature, int key);
00022     
00023     /*
00024      * Sets the chosen LED to the proper color of the note passed in.
00025      * @param key[] This is the notes information such as the numerical key value and RGB values.
00026      * @param type This integer determines whether the event coming in is an "on" or "off" event.
00027      * @param signature Determines whether the note is sharp or not
00028      * @param led Determines which LED to light up
00029      */
00030     void setLedToKey(int colors[3], int type, int signature, int led, int key);
00031     
00032     
00033 };