WEDNESDAY

Class Info

What: Intro to Physical Computing Wednesdays, ITPG-GT.2301.5
When: Wednesdays 3.20pm – 6.15pm (Wednesday Class Dates)
Where: NYU Tisch Building, 4th floor, Room 447
Who: Benedetta Piantella

Contact

Best way to reach me is via email at: bp432@nyu.edu or benedetta.piantella@nyu.edu

Office Hours by appointment on Monday, Wednesday and Thursday. Sign up on my Calendar or email me to set something else up

Grading

In-class Lab Work & Participation: 30%
Game Controller: 20%
Documentation & Blog: 20%
Final Project: 30%

Supplies

See the following link for Parts Needed

Useful Links

Some Reference Books

Class Blogs

Please email me the link to your blog documentation for the class so we can continue our conversations and offer feedback online too!

Class Notes

Here are some relevant notes from class.

Class 1 – Sept 3

Examples of Tangible Interface:
Marble Answering Machine
Makey Makey
Sticky light

Interesting Interaction:
ZeroN

Class 2 – Sept 10

Related to the readings:
Video by Bret Victor on “Thinking the Unthinkable

Similar take on technology of the future by Corning

Future Tech in TV Show “Weeds”: http://venturebeat.com/2012/09/17/weeds-finale-tech/#s:weeds-2
(Scroll the image slideshow at the bottom and see different views of a similar technology to this week readings.)

Sixth Sense Technology

Interesting read on Interaction:
Chapter 1 and 2 of Where the Action Is: The Foundations of Embodied Interaction, by Paul Dourish

Related to the principles discussed in the class readings:
Resistulator: http://www.zambetti.com/projects/resistulator
Online graphical resistor calculator: http://www.dannyg.com/examples/res2/resistor.htm

Related to the concepts discussed in class:
Electricity as water analogy:

[table “” not found /]

Voltage:

[table “” not found /]
[table “” not found /]

Volts, Ohms and Amps:

[table “” not found /]

Class 3 – Sept 17

Video by Don Norman on TED on “3 ways good design makes you happy”

Class 4 – Sept 24

A great example of digitally generated music by ITP Alumn Tristan Perich:
http://www.1bitsymphony.com/
http://www.tristanperich.com/#Album/1_Bit_Music
http://www.loudobjects.com/

And by ITP Alumn and Adjunct Nick Yulman:
http://nysoundworks.org/

As discussed in class, ways of modifying pitch (frequency) at the same time as volume using a potentiometer:
http://garagelab.com/profiles/blogs/how-to-use-tone-function-arduino-playing-the-james-bond-theme
There are also digitally controllable potentiometers, so that is a way you can actually modify volume in code rather than by manually turning the knob. We will look at this in a few weeks.

Apparently there is also a new tone() library that can do volume and pitch at the same time (although it seems like the sound is not so good!):
http://playground.arduino.cc/Code/ToneAC

Also check out these other cool examples of things you can do with the tone library:
http://arduino.cc/en/reference/tone

Very old example not using the tone() library. I can’t vouch for this as I haven’t tried it in a while:
http://www.arduino.cc/en/Tutorial/PlayMelody

Movements and mechanisms:
http://507movements.com/
http://www.flying-pig.co.uk

Class 5 – Oct 1

Working with sensors one of the most important aspects is to understand their behavior and understand how to take advantage of their range. Do you need the full range for your application? Or are you specifically looking at certain thresholds in order for something to happen? For every project you will have to thoroughly analyze your sensor options in order to identify the one that fits best as well as really understand what action/input/energy change you are looking to interpret and pick up on so that you can tune your sensors to that.

Here are some examples of things you can do:
https://itp.nyu.edu/physcomp/labs/labs-arduino-digital-and-analog/lab-sensor-change-detection/

And here, for example, Craig Pickard very successfully interpreted the sensor and made it work for his application, before you copy and paste his work (giving him appropriate credit of course!) please spend some time understanding the thought process behind his decisions:

http://www.craigwentdigital.com/2014/09/physcomp-week-4-labs-serial-communication/

During break please take a moment to watch the videos linked while continuing to work on your midterm. If you feel comfortable enough with serial communication, check out the Node.js lab and video.

Class 6 – Oct 15th

If you get this error in Processing:


Error, disabling serialEvent() for

It’s not a bug in processing, it has to do with the asynchronous nature of serial (this is why it’s called “asynchronous serial”). You’ve got a serial buffer being added to by the Arduino, and being read by Processing, but not at the same time (asynchronously). The external device (Arduino) and the internal program (processing) are not aware of each other, so they don’t know when the other one is accessing the buffer, or what’s in there.

Furthermore, what’s unread in the buffer remains in there when your program releases it. So, for example, if you quit Processing and there’s still some bytes left in the buffer, they’ll be the first thing read the next time you start up. If the first character read happens to be a newline, and if your program generates serialEvent() on a newline, then the string you read will be null, and you’ll get the error. That’s why Ross’ solution can help. It’s basically saying “make sure there’s nothing in the buffer before I start.”

There are other solutions. You could, for example, make sure the string you read is not null before you start acting on it, something like this:


void serialEvent() {
String input = myPort.readString();
if (myString != null) {
// do the rest of your stuff here
}
}

It’s also possible that the string you read contains some data, but not the whole sentence you’re looking for. For example, if you were looking for three numbers in the buffer like this: “345,212,345\n” and what remains in the buffer from the last time you read the program had only two values, then you’ll get an error if you split the string and try to read three values. That’s why this solution helps:


String[] values = split(inputString, “,”);
if (values.length > 2) {
// now you can read all three items in the string
}

The bottom line is that because asynchronous serial is asynchronous, you always need to check that what’s there is what you think. The most common three tools for doing that are:
* clear the buffer before you start reading
* use a handshaking method so there’s only one set of readings when you read
* make sure the string you read is the length you think it is before you read its elements

A really bullet-proof program does all three of these things.