Go Down

Topic: Lighting individual LEDs with assigned keyboard inputs via PC (Read 332 times) previous topic - next topic

corbeau

I am very much a beginner, so apologies for my absolute ignorance on this. I've posted about this project in the LED section but I've got to the point where programming issues are more relevant.

I'm just about to start work on a project where one of 26 keys on a keyboard (via PC rather than independent) lights an assigned LED, so a tap of the A key will light LED 1 and B will light LED 2. I also intend to program it so that the linked LED changes each time a key is pressed. Not randomly, but in some form of cyclic sequence. For example, the first time I press "G", LED 7 lights up, the next time LED 15 lights up, then #19, then back to #7 etc.

However, I understand that the serial monitor only transmits the program after Enter is pressed... is this the case or is there a way around this?

Many thanks in advance

PaulS

Quote
However, I understand that the serial monitor only transmits the program after Enter is pressed... is this the case or is there a way around this?

Yes, that is the case. So, don't use it. Write your own program that monitors keyPress and keyRelease events, and does something.

Go Up