Professional Documents
Culture Documents
Led Hal
Led Hal
// --------------------------------------------------------------------
// --------------------------------------------------------------------
bool Clear_Strip(WhichStrip)
// --------------------------------------------------------------------
This function sets the color of a single LED in an LED strip
// --------------------------------------------------------------------
return false
if the LED number is less than 1 or greater than the number of LEDs
return false
switch on Color
case Red:
break;
case Green:
break;
case Blue:
break;
case Purple:
break;
case White:
break;
case Yellow:
break;
case Turquoise:
break;
case Pink:
break;
case Gold:
break;
default:
set red, green, blue to 0
break;
// --------------------------------------------------------------------
This function sets the color of all the LEDs in an LED strip
// --------------------------------------------------------------------
return false
switch on Color
case Red:
set red, green, blue to appropriate values
break;
case Green:
break;
case Blue:
break;
case Purple:
break;
case White:
break;
case Yellow:
break;
case Turquoise:
break;
case Pink:
case Gold:
break;
default:
break;
// --------------------------------------------------------------------
// --------------------------------------------------------------------
return false
loop through selected strip
return true;
// --------------------------------------------------------------------
This function writes the contents of the buffer to the LED strip
// --------------------------------------------------------------------
bool TakeDisplayUpdateStep(WhichStrip)
LED index = 0
// --------------------------------------------------------------------
This function sets internal pointers to the appropriate LED strip values
Output: N/A
// --------------------------------------------------------------------
if left drum