Physical Computing – Week #7– Midterm Project

For our midterm project, I’ve been paired with Melanie – NYC souvenirs and fireworks fan.










We started with discussions and brainstorming, and after going through a lot of ideas, and overlooking on our latest projectד in P-comp class, we decided to create a snow-globe that reacts to motion, and show this reaction on screen using P5. We both like the idea of an independent product, that will move a user to interact with our piece. Our final goal is to find a snow globe that can be physically comfortable to shake, and to create digital snow that will effect on webcams stream of New York city sights.


we stated with the accelerometer, and with the serial communication lab that connects the Arduino to the p5 sketch.

We got some advise from Laura the resident and Moon. This is Laura’s code for snow:


We got Laura and Moon’s example from the ICM sessions on how to make snow, and changed it so it will fit our motions that we wanted to show on screen.



Our research on how to show the webcam online, led us to Sam, and also Ruben from 2nd year, that told us we should download flash to p5, but basically said- first start with a ready made video, then it will be easier to switch to the real thing. So we did. Melanie took a snap video of the screen from the webcam in front of the statue of liberty.


In order to make the physical element of the snow-globe, we searched around the city for one that fit us the most.

We started online, continued in Chinatown and then 5th Avenue, between 20-30 streets.

thumb_IMG_4080_1024 thumb_IMG_4077_1024















We found one that we can take out a music box from the bottom, and then fit a smaller version of Arduino.


IMG_4105 IMG_4106








We met to try out our first prototype, which was successful thanks to help from Moon.











After we got good results with the basic circuits, we continued to try and make this circuit more compact. Melanie was really excited to try the compact Arduino and bluetooth, so she figured she’s going to use it in the future and ordered a few components that can help us with this project: Arduino trinket, our own accelerometer, and Adafruit bluetooth. We soldered all the boards to the pins:




















And after a few rounds of trouble shooting we got this:



















The most problematic issue on the way was that the Arduino trinket wrote the value differently than what we got with the regular Arduino. Part of the issue was that the Trinket pins are too small to see correctly where you put the pins. TIP- work with data sheet 🙂

After we got the accelerometer and Trinket work well, we had a round of tryouts to connect this whole thing to bluefruit. With no success and advisment from Sam, Aaron (1st year) and Pedro, we decided to keep the wire. It sounds like in order to get the trinket to work with bluefruit you need to install a different serial library and to call the serial communication – Serial1. I would like to research it in the future, but for now, we think the best thing will be to continue without blutooth. We decided on the best enclosed for the circuit, that Melaney built, cuz sh’e know how to build stuff :).

First stage documentation:


This is our final piece:


Physical Computing – Week #6 – Serial Communication

↯  Asynchronous Serial Communication

I started with this lab with two photo sensors in my circuit to get two values in the serial monitor:



Screen Shot 2015-10-08 at 4.23.15 PM


Screen Shot 2015-10-08 at 4.23.22 PM



After changing Serial println to Serialwrite and got a line of gibberish..

I continued to print different values of data ( ASCII, decimal, hexadecimal, octal ):


Screen Shot 2015-10-08 at 4.44.15 PM
Screen Shot 2015-10-08 at 4.44.18 PM Screen Shot 2015-10-08 at 4.44.20 PM













After seeing the different values, I continued to get values from all sensors connected,

by using methods of Punctuation and hand shaking:



Screen Shot 2015-10-09 at 9.48.50 PM Screen Shot 2015-10-09 at 9.48.52 PM







Screen Shot 2015-10-14 at 5.00.35 PM








↯  Serial input lab

Getting the potentiometer values on the p5:

Screen Shot 2015-10-10 at 9.54.02 PM Screen Shot 2015-10-10 at 9.54.06 PM







Graph made with the sensor  value:




Screen Shot 2015-10-10 at 10.24.54 PM


Graph with delay:

Screen Shot 2015-10-10 at 10.28.13 PM 1

Sending value as “strings”:

Screen Shot 2015-10-14 at 5.14.22 PM



↯ Serial output

↯ Serial communication Arduino and p5

I started by connecting the accelerometer:




























The accelerometer was also good to know, as we and Melanie decided to create our midterm project based on the values that it gives and affecting particles in p5. We did brainstorming about ideas we had, which basically connect our worlds in terms of Malenie’s sculpture knowledge, and my interest in particles, and also around some of our previous works. I liked her statue of liberty work, so we stay in those areas for our project. I likes the idea of taking souvenirs and hack them..I also started to look into the bluetooth component, and it looks like there was a communication between the computer and the component, but still need to figure some applications for the bluetooth. We already thought about our object that will start the operation on screen, and we would love to see it without wires attached to it, we first checked that it’s working with the wires, and sat with Laura and Moon to get some more help with the code. We got our first stage to work, and we will continue this week.



Physical Computing – Week #4 and #5

This week we learned about analog outputs, after using the motor freestyle last week, right now we can actually control it using PMW pins on the Arduino board.

↯ The lab assignments this week included using analog input to control a servo motor.

↯ The next lab that I made was the tone output using an Arduino. It took me few moments to realize that I need to download the whole tones library, but after I used the code, and plugged the speaker, it was quite fun to make the melody by myself. You can check it out here.



This is how the part of the melody code looks like:

#include “pitches.h”

// notes in the melody:
int melody[] = {

// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 4,4, 4,4,4,4,4

void setup() {


So I’ve looked into getting the right tones, and played with the 4 and 8 until I got to the point where you might recognize the song…

↯ I’ve teamed with Ella, another 1st year to do together the sensor change detection lab. I was testing it with a photocell instead of the FSR.  In this lab we suppose to detect the peak, count presses, or peaks, it sort of a way to know when is the highest and lowest point of pressure, if you need to use those in our projects.

At first I’ve probably had some wiring problems, because the serial monitor kept showing “button was just pressed” even if I didn’t activated the sensor. After a few round of switching both Arduino and breadboard, I got the results.

↯ I made this week another collaboration with Adi, another 1st year, at the ICM/Arduino synthesis, where we decided to a use simple circle growing example, to be controlled by IR sensor. We started by reading the value that the sensor send out, and than mapped it to grow in the limits that we wanted, we than connected our Arduino port to the ICM which makes the serial connection. The result – Mars planet the grows as you get your hand closer to the IR:









Physical Computing – Week #3

This week we got familiar with the Arduino microcontroller. We can program it for specific applications.

In our home work we experienced analog and digital circuits.

First I started with the analog lab, using potentiometer and force resistors. Both of these components are analog input that we connect to the Arduino, and they’re range vary, other than digital which it’s range is or 1 or 0.


↯ ANALOG LAB : Potentiometer , Photo resistor & FSR 


This is the value that was printed:


It was weird that the minimum value was not 0..why is that happened?..

















The valued vary between 76-77 up to 916, again, no zero..


↯ FSR 

For the creative solution I wanted at first to make a record player by adjusting the power of a motor that it will be able to be in the right spinning speed for a needle to get the sound out of it.  I got help from Druje, a fellow ITPer, who has experience in physical computing before and he showed me how you can make a resistor from a potentiometer, which was a great thing to know..I made it work in terms of mapping the value and make the motor spin only after getting over 100 value, but after research and also getting few advices from TK, I figured it will  need much more work to make it actually be in the same spinning control that the vinyl require.. Any way it was a nice experiment, and I hope in the future I can make it work completely.















I went to “Barcade” which is an arcade game bar, I thought to observe the interaction of the gamers with the machines, but actually when I got there, I found the change machine! which seemed to be neat and small for this mission. The machine reads a user input – 1-20 value dollar bills, and output game coins. The people that uses it, are the bar customers, most have them looks like it’s not their first time there, and do this action pretty quickly. few people got their bill back because they didn’t insert it the right way. When you are in a hurry to defeat your friend it the game, it looks like they are really annoyed that the machine can’t just read the bill int hey way they inserted it. Most of the people did it quickly, in a matter if 6 sec for the transaction, and a few more seconds to collect the coins- depend how much you got. the output is in this metal pocket that you need to collect the coins from it’s inside. The machine that I observed wasn’t high tech, it looked very simple and I think this is what allows it to be quick, and I think except the coin pocket, it’s has a good user experience. It’s function has good relation with it’s form. It’s location was good, just by entering the main hall of arcades. I think that Bret Victor can be sure that future of change coins machines in arcade bars is safe from the touch interface for now.

Physical Computing – Week #2

Labs: Electronics

This week in class, we got familiar with a lot of components and terms in electronics, and saw examples of how to create circuit on a breadboard, started to build simple circuits and using multimeter.


↯ Sensors: translates signals from analog to digital. There are also actuators which translate digital to analog.

↯ Switches: Closing a circuit only when pressed/toggle/spin.

↯ Voltage regulator: 7805 regulator, translate input of 8-15V to output of 5V.

↯ LED’s are Diodes that emits light.

↯ Resistors: Resist the flow of electrical current

↯Beard-board: Tool for building circuits, and test it.

↯ DC Motor: An electromagnetic field generated by current flowing through a wire coil.

↯ Power jack:  with a help from residents Ziv and John I manages to solder my own power jack! it was a fun little project by itself:





Current(I) – flow of electric charge, measured in Amps.

Voltage(V) – amount of energy to travel in circuit, measured in Volts.

Resistance(R) – used to control the flow of current. unit of electrical resistance is the ohm (Ω).

There are three formulas to get one of those variables:

V = I × R

I =  V
R =  V

I also found web site that can calculate this.



I started with setting up a breadboard, and used the power jack I soldered:







Arrangement of switches – three switches in parallel:


Three switches is series:


DC Motor:


For my home work I decided to create a switch with a matchbox.

I started in trying to write to myself the schematic for it:


















At first I wanted to create a switch that works from both sides of the box. But after spending a lot of time in soldering and creating the first LED, I decided to keep it one side.

I bought a coin battery of 3V, that way I could solder a circuit and put it inside the box:



My first attempt to create the switch, was with conductive tape, it was a good tryout, but the connection was not solid al of the times. This part meant to close the circuit.

The soldered open circuit:thumb__A1A9776_1024

Final result:


Physical Computing – Week #1

What is interaction?

Interactivity can be defined as a form of communication in which both sided listen, think and speaks. Both sides need to react. For example, other than play or a TV show, audience size is the most important factor in permitting interactivity in performance art. Interactivity described as superior to all other forms of expression. When an interaction works – we are truly engaged.

An interactive experience will sweep us in, other than a book or a play, because we don’t have the other side that react to us.

A lot of our interfaces require coherent and intelligent interfaces, but we need to remember that it’s not enough. From the book reading by Crawford, graphic designers should know how to not just make it pretty, it needs to integrates form with function.

Bret Victor in his essay, give us wonderful examples why the future of interaction shouldn’t be based on “pictures under glass”, but will use a very basic and most natural tool that we have – our hands. He truly makes a point of how bad our future will look like if we only going to use the tap that our finger can make, and not the whole spectrum of possibilities that out own tools can give us.

Use your hand and click here.