Midterm

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.
image5

We then expanded the concept to 3 microphone sensors.
image3

image4

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.

image2

[youtube https://www.youtube.com/watch?v=6a4Kj3TGMXg]

[youtube https://www.youtube.com/watch?v=zl_HptopmWU]

[youtube https://www.youtube.com/watch?v=z2RA5YnfFWI]

Serial Communication Labs 10/22/16

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.

20161021_202857

20161021_204214

I then tried my first attempt at P5 and it was a mess. I tried following along with the directions, but the index.html file didn’t have the line that was referenced. “script language=”javascript” type=”text/javascript” src=”libraries/p5.js”></script”.

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.

20161022_212600

Application of Labs

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.

1013160125script

[youtube https://www.youtube.com/watch?v=A7vPsCWMm7k]

Labs: Eletronics v2

For the past week I worked on catching up with the lab assignments. This is the button switcher with LEDs in parallel.

[youtube https://www.youtube.com/watch?v=WDc7WxqJNTc]

The next lab involved a potentiate and LED to simulate variable voltage.

1007162335

[youtube https://www.youtube.com/watch?v=CoHka83xYX4]

Then I built the Servo variable resistor circuit. That was fun and noisy.

1008161535a

[youtube https://www.youtube.com/watch?v=0OR5Na1cnDM]

Now the speaker with photoresistor.

[youtube https://www.youtube.com/watch?v=C4xVgquP038]

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…