Hey guys, I'm making a laser harp and was wondering if someone could help me out with the code for this. I want to control the MIDI note velocity (volume) by a 5k pot and need help. I've already established a MIDI serial channel and note velocity.
Sounds easy.
Read a value from the pot using analog.Read() and map() the value returned to the range required. For more detailed advice I suggest that you post your current code so that we can see how it is structured.
shanemachine:
I knowwww using global variables are frowned upon, but I'm a newbie so that's my excuse XD
No need to apologise. Global variables are very handy and as long as they are sensibly named and kept to a minimum they work well in the Arduino environment.
I will look at you program when I get a chance.
EDIT: or I would do but all I get from your link is an empty document. Please attach your program to a post here using the Additional Options link at the bottom left of the message edit window.
Here's the .txt of the code and the .ino file. Please excuse some of the comments between the 14th and 18th "strings" I got lazy and didn't update them. I will now.
EDIT: I updated and replaced the .ino file but not the .txt.