Hello world, I am trying to apply the button tutorial to a rock band guitar. The idea is that when I push a button on the guitar, the light goes on. Instead, when I push the guitar button, the light goes off (and is just on always). I have tried playing with the program but the light still stays on. I am connecting the ground and digital power 2 to the guitar wires. Am I missing something really simple here? I am a total novice at this thing and could really use the help! Thanks in advance for any advice!! ~T
val = digitalRead(12); // read the input pin digitalWrite(13, val);
maybe something like this?
Wiring? Read this: