Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed USBDevice PinDetect
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 };
Generated on Thu Aug 11 2022 16:09:57 by
1.7.2