Mid Term Project

Introduction to Physical Computing

28 Oct 2018

The midterm project for PCOMP was to showcase our experience with serial communication. The topic for the assignment was Halloween.


For the project we were assigned groups and my class being an uneven number of students, my group had three students.

The three of us came from different backgrounds. Anna was experienced in film production, Carol a recent graduate from UCLA’s DMA undergraduate program (a program similar to IMA here at NYU), and myself a tinkerer and experimenter.


We met pretty early on after getting our assignment to discuss project ideas. Our group eschewed the idea of doing something related to candy, and wanted to work with something scary. We pretty quickly settled on the idea of a mirror, with something like magic mirrors as our reference.

These mirrors utilize 2 way mirrors and screen technology to display digital images on to the surface of the mirror. Super cool. :information_desk_person: We pitched ideas about what we could do with the mirror, from face deformation to masks. We settled on using jump scare technique to shock our viewers where the mirror would play a sound to lure a person closer and when in range quickly display a scary image.

After a lengthy discussion of how it would work (and whether it was pcompy enough for the class) we decided that we would use a proximity sensor and the serial data to a browser using p5.js in order to access it with an iPad. We picked an iPad because it included everything we needed such as speakers, a display, and a compact size.

Through the ideation process we threw out ideas such as using a Kinect or cameras for our sensor as that would be more computational than physical.


Materials list:

We convened to work on the project and split up the coding tasks. Carol had the distance sensor so she set up the electronic components and got serial connection working with the browser. In conjunction Anna programmed the image pop up using the mouse position as the input, while I worked on the sound component.

Afterwards we joined our sketches together and Carol refactored the code to incorporate the different functions to work with the physical sensor. In the meanwhile I soldered long wires to the sensor and Anna created the audio files that would go into the final project.

With all of the pieces working together we worked on creating the presentation of the object. As Carol designed the frame for the mirror, Anna and I made a trip to Ace Hardware to see if we could find any materials for the frame. Ace Hardware was kind of a bummer as they didn’t have sheets of bolsawood that we wanted to use for the frame, but Anna managed to find some useful mirror mounts.

When we got back to the floor, Carol had finished the lasercutting template and began cut the frame out of sturdy cardwood, and I found pieces of pine and cardboard that would work to create a backplate for our iPad and mounting surface for the mirror. With that we assembled the project and finished for the day. At this point our program worked in a small testing scenario.

The next time we met up to work on the project we began to consider the final presentation of the project. We decided that it would be best to hang it on a wall as displaying it flat on the table left an unsatisfactory presentation.

We chose to place it in the hallway outside of the equipment room where there was a velcro wall. However, when we hung it we began to experience problems with the sensor. It would jump a lot between readings and the serial communication became quite poor. Carol hosted the file locally using python’s SimpleHTTPServer library and we connnected the iPad with the browser. While the program worked better directly on Carol’s laptop, the sketch would freeze on the iPad.

Trying to debug the serial was a lengthy process so we decided it would be best for the class presentation to display it on the host machine. To combat the poor iPad performance we checked out a small raspberry pi monitor to connect to the computer.


The overall feedback was pretty positive. When it worked well we got the intended interaction. People were enthusiastic about our aesthetic and the fine work Carol did in desiging the frame. Anna’s sound design was also well received. Tom commended our choice to place it in scenario as well.

During our presentation Tom pointed out that our poor sensor data was contributed to the velcro wall we had mounted our project. Apparently the sensor is highly affected by static electricity which velcro gives off.

In the classroom exchange we returned the mirror to the classroom and hung it against a concrete wall. We also switched it back to using the iPad with the localhost. When it was set up here we got much better sensor readings and everything worked as intended.

Lessons learned

A major lesson we learned was the properties of the ultrasonic sensor. Next time I will know better to shield the sensor from outside forces. For the next time I would smooth the sensor data as well. In the future I think it would beneficial to ask someone about the physical properties of the sensor as well since we spent a long time looking in the wrong place while debugging.

Also the collaboration worked quite well. Since we divided up the tasks and worked on them in tandem we were able to finish everything relatively quickly.