For a small project of mine I would like to implement the following features:
1) turn on/off the CP lighting with a toggle switch
2) illuminate some text on the CPO graphics only when a certain event is detected (by activating a microswitch)
All LEDs on CP will be 5V
Now, I have no experience with LED lighting and related software so my questions and what I'm about to write may probably not make sense, please bear with me.
About 1): my first idea was to turn on all the LEDs by connecting them to an interface (e.g. PAC-Drive) and use the toggle switch to cut off the power when "OFF" is selected.
But then I thought that in this way the interface would be disconnected from the USB port and this could perhaps lead to unwanted effects in Windows, especially if the LED ON/OFF operation occurs during a gaming session. I also fear that this procedure could damage the board, at least in the long run.
Ideally, I suppose the best way to proceed would be to turn off the LEDs via software but this would require something that can control them (LedBlinky?) and that only executes this command when the toggle switch is “OFF” and turns the LEDs back on when it is “ON”.
The problem is that I have no idea if LedBlinky can be "controlled" by some third-party software and also there is still the problem that the on/off procedures must reflect the state of the toggle switch: is there some software tool that runs in resident mode, can read the state of the toggle switch (as “key press”, the toggle switch should be connected to a special interface that allows this, I thought of U-HID – is that correct?) and command LedBlinky to turn off or on all LEDs accordingly?
If all this is not possible, what do you suggest as a "clean" solution, i.e. without having to resort to additional control boards such as Arduino and/or the programming of related complicated scripts if not entire software?
About 2): in my intentions, I would like to place a couple of microswitches under the CP as "sensors", i.e. to detect a a specific mechanical movement: the idea would be to illuminate a certain text when microswitch #1 is activated, another text when the #2 is activated and a third text when neither is activated. I want only one text to light up at a time, depending on the state of the microswitches-sensors, so I must also make sure to turn off the text that (possibly) had been previously turned on.
Similarly to 1), I could connect the two microswitches to U-HID and associate them with key buttons but then some software is needed which, as already explained, intercepts the pressing of the keys and commands LedBlinky accordingly.
Again, if this “magical” software tool does not exist, or LedBlinky cannot be controlled by third-party software and there is no alternative to LedBlinky that can perform the same functions (control the LEDs), is there anyone who can suggest me a solution that is not incredibly complicated from a technical point of view?
Many thanks!