For our PComp midterm everyone in my class was assigned into groups to work on a project. I initially thought it would be a good idea to use a sensor array to map out a color space and have the output reflect where the user was activating. We ran into some issues with the microphone behavior so we decided to re-purpose our configuration for another interaction.
We ended up making the interaction be based on sound and distance. We mapped 3 sensors to a corresponding color value. We had each color go to 3 LEDs in series. Our idea was that we could get the colors to blend if we diffuse them at a distance.
One of the biggest problems we ran into was dealing with the noise of the environment and the circuit. We couldn’t get the sensor readings to zero or even close to it. So we ended up having to deal with low resolution values for our sensor range.
This is the proof of concept. Using one microphone to control the brightness of the LED.
We then expanded the concept to 3 microphone sensors.
We at the same time wanted to work on the serial communication with P5. We ran into some additional issues here. Most of which probably involved us not using a handshake for communication.
I first worked on the Async serial communication lab. This went fairly well. I didn’t use the accelerometer because I haven’t soldered the contacts yet. Instead I used 2 variable resistors as seen in the pic.
I ended up pasting both lines in it. The add file function doesn’t seem to work for me so after a blank file was added, I pasted the contents of the p5.serialport.js inside it.
At some point I was able to find out my serial port name but I can’t seem to open it properly at this point. I am showing the error below. I’ll need to ask for help getting this running.
For my basic application I planned on making an alarm box. When someone opens the box when it’s armed, it will flash lights and make a noise. This would occur until a green button is pressed. A red button will be used for arming the alarm.
I think I would have pulled it off if I designed my circuit beforehand. However I was able to have an alarm triggered and and make lights and speaker cycle on and off. I made a lot of errors with running the wires in the wrong direction or forgetting to power the breadboard.
For the past week I worked on catching up with the lab assignments. This is the button switcher with LEDs in parallel.
The next lab involved a potentiate and LED to simulate variable voltage.
Then I built the Servo variable resistor circuit. That was fun and noisy.
Now the speaker with photoresistor.
The only issue I had was breaking off the lead wire in a Arduino pin socket. Luckily that led to ground. I also got to use a soldering iron to connect the wire leads to my speaker.
Now hopefully I can work on an application of these for tomorrow’s class…