The TLC5940 is an IC from Texas Instruments for controlling 16 PWM channels of LED control. It will interface with the Teensy and provide the button power and PWM signals.
While the block diagram is a bit busy, it's pretty easy to interface with the Teensy. Requiring just 5 signal wires, with 2 additional wires running with resistors to set IC states.
The logic for controlling the TLC5940 will be via the PJRC TLC5940 Library (github), which will make controlling the LEDs in the buttons super easy.
#include "Tlc5940.h"
void setup() {
Tlc.init();
}
void loop() {
Tlc.clear();
Tlc.set(0, 4095); //channel 0-15, value 0-4095
Tlc.update();
}
Using this library, setting up fading effects and variable brightness for button states will be easy.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.