Now I'd like to improve that project adding retroilluminated led buttons. I can do that adding one more Arduino Mega to switch on the leds below the buttons. The problem is that the PC sends some midi notes and I need a sketch who switch on a led when it receives a note value via midi on USB. I use LoopBe1 and hairless midi-serial for the bridge. In other words all I need is a sketch who gives a status HIGH to a pin when a midi note value is received (for example 50) and a status LOW when a different note is sent from the PC (switching on another led through another pin) and so on...
Can you help me? Is there any tutorial about that?
Thank you in advance.
Thank you for your answer but I need something much more simple. In the code you indicated there are instructions to work just with some notes and there are other instructions about the "strobe" I don't need it.
All I'd like is something like: if I receved note 46 (for example) pin 2 (for example) status HIGH and when the note is no more played, pin 2 status LOW. At this point I repeat the instructions for all the pins and I have what I need.