I have completed my arduino synthesizer project. You can see photos and source code of the finished build.
I had a hard time figuring out a problem I had with the microcontroller getting seemingly random readings from the keypad. The problem was that I was not using pull-up or pull-down resistors to stabilize the state of the pins on the microcontroller. I don’t know a terrible amount about electronics, so my Dad helped me out with his knowledge. The Atmel ATmega168 micro has built-in pull-up resistors which are turned on in the following manner using the arduino interface:
pinMode(pinNumber, INPUT);
digitalWrite(pinNumber, HIGH);
The pull-up resistors mean that if a particular button is not pressed, it’s state will be a logical 1, or true or on, whatever you want to call it. If the key is pushed, the pin will read a logical 0/false/off.
I am going to make a slight change to the code to make it better though. Right now you have to push and hold a button to assign a new frequency to the corresponding step in the synth sequence until the loop gets to that step in the sequence. I want it so when you push a button, it immediately adjusts the frequency for that step, giving the device a more responsive feel.
On another note, I am going to put a new distro of linux on my laptop. I was using Ubuntu 8.04 so I figured it was time for an upgrade and an online friend told me about a new distro of linux based on Ubuntu which I am going to try out. She said she has had great success with this new distro and everything worked out of the box, including WiFi on her laptop. Sounds promising for me because I have had an unpleasant time with WiFi and linux in the past. Hopefully the video driver is up to par, too.