Let’s make some music….err rather some noise. There were a few distinct pitches produce by the melody sketch however, on every occasion I was only able to produce at best some clicks and at worst just some static.
Spea Ker,
Let’s make some music….err rather some noise. There were a few distinct pitches produce by the melody sketch however, on every occasion I was only able to produce at best some clicks and at worst just some static.
There are a number of variables at play here so I tried some different configurations to try and work through the problems.
First I had only two Force Sensitive Resistors (FSR), they were labeled “19” and “20” figuring this was by design I tested both to find the range for each FSR.
Using the serial monitor I was able to see the following:
“19” had an approximate range of 0-29
“20” had an approximate range of 0-288
I wasn’t sure if this would have in affect on the success or functioning of a circuit. I used this information for both the analogTone circuit and the threeKeyInstrument circuit. I had better results with the threeKeyInstrument than the analogTone circuit, but that is getting ahead of ourselves here. Let’s look at the analogTone circuit first.
I mainly focused on map()
changing the range of the sensor to get different results. I never had the ability to produce a clean sounding tone. I was able to alter the tone or completely stop the sound from playing. I change the FSRs for phototransistors but had much of the same results, and the same while using rotatory potentiometers.
Now lets turn to the threeKeyInstrument hers where the real fun begins. First it is got to note that the only sensor I had identical copies of were the photoresistors, in addition to those I had as follows (1) ribbon sensor, (2) rotary potentiometers, (2) flex sensors, (1) FSR labeled “19”, and (1) FSR labeled “20”. The ranges of all of the varied pretty wide not sure how that would change the output, I carried on. Something of note, as a newbie to the physical computing world trouble shooting can be very time consuming, frustrating , or fun this being said Tom Igoe said in class that the best way to troubleshoot is to go back to a point where you know what is happening, this is incredibly sound (pun intended) advice.
What follows are the combinations of sensors used while trying to accomplish the task of the threeKeyInstrument the order point is the physical location of the sensor moving down the breadboard away from the Nano:
- FSR 19, FSR 20, flex sensor
- FSR 19, FSR 20, rotary pot
- Ribbon sensor, , FSR 19, rotary pot
- Rotary pot , FSR 19, ribbon sensor
- Ribbon sensor, FSR 20, rotary pot
- Rotary pot, FSR 20, ribbon sensor
- Moved analog wires down by one pin from AREF, A0, A1 to A), A1, A2
- All combinations above yielded the same output: crinkled sound with static, there was no distinct note produced
- Phototransistor, Phototransistor, Phototransistor (no sound at all)
- Removed all sensors and used jumper wires in place
- Changed
threshold
to 0, 5, 10… 45 - Repeated all above with no 100Ω resistor, same results
At this point I’m not sure what caused this behavior, further trail and error will be needed to find the cause.
Throughout the whole speaker portion of the lab the volume was very very low.
Ser Vo,
This part of the lab went fairly well, I successfully controlled the movement of the servo with an analog input however, there was some noticeable hesitation and electromechanical wine emitting from the servo throughout the whole process. The servo used was a FS5106B which states it is a high torque 6V unit that can operate with either a 3.3V or 5V input voltage. I remember in one of the videos something about servos and using delay() or something equivalent to reduce the lag between input and output, but I was unsure of how to implement it. I will tackle this addition to the code at a later date.