Step 12: Upload visualization sketch to your Arduino
To test your setup, we're going to use the same visualization software as we used in our muscle sensor demo video. If you haven't already, download and install both the Arduino and Processing software.
Next, download and unzip the visualization program files: Arduino, Processing. Open the Arduino sketch and upload it to your UNO. If you're new to Arduino, check out the information on Arduino's website to help you on this step. Once uploaded, plug in the wall adapter to the barrel jack to power up your muscle sensors.
Next, open the Processing sketch and hit the Run button in the top left. Another window will pop up with 6 colored bars on it. Flex your right forearm, left forearm, right bicep, and left bicep and watch the bars move accordingly. If while at rest, your sensors value is below or above 150 then adjust the gain of your sensor using a screwdriver and turning the poteniometer on the corresponding sensor so that they are around 150 at rest.
As you flex each muscle, the bars should move past the 300 mark. This is important since the software to follow uses the 300 mark to trigger a "button press". You can adjust the gain of your sensor and this threshold level in the code to fine tune your desired button press sensitivity.
Once everything appears to be in working order, close out Processing and you're ready to hack your Arduino into a keyboard.