Week 2: Analog Input


Led brightness controlled by potentiometer

Unfortunately I cannot post a video here that would explain this lab much better than I can…

Basically, a potentiometer is hooked up to the arduino. The arduino reads in theanalog value of the potentiometer (twisting the pot changes it’s resistance which the comp can indirectly detect) and changes the led accordingly.

When the computer receives analog information about the potentiometer is converts that information into a digital language it can understand (namely a ten bit number: 0-1023) using the built in ADC (analog digital converter). When the computer tells the light to be brighter or dimmer it is doing so by pulsing the voltage from 0V to 5V (using PWM) at different rates (the percent of time spent at 0V or 5V can vary. Thus, the average voltage can vary as well anywhere in the 0-5V range). This pulsing can be seen using a camera but is not detected by the human eye.

The circuit is built like so:

Circuit for analog input lab

and here is the code:

const int ledPin=9;
int potVal = 0;//initialize
int brightness = 0;
float voltage = 0;

void setup(){
pinMode(ledPin, OUTPUT);

void loop(){
potVal = analogRead(A0);//between 0 & 1023 when mapped
delay(5); //ADC processing time
//potVal = map(potVal, 0, 800, 0, 255);
brightness = potVal / 4; //divide by 4 because 0-255 is the full output range of analogWrite
analogWrite(ledPin, brightness);
voltage = (potVal/1023.0)*5.0;


Note that the mapping is an alternative to creating the constant brightness and map values will depend on your particular LED.

Fantasy Device


A device that I would dearly want and that is not completely out of reach is a simple to use 3D printer paired with a scanner…

To use it you would place an object you which to duplicate inside your device (imagine a stylish microwave) and your object would first be scanned. After the scan, you would be asked to customize your duplicate (scale, number of copies, colors, materials, etc.) and your duplicate would be ready a few minutes later…

With regards to the interface, something easy and functional would be best (think standard copy machine controls). What might be interesting however, would be if you could digitally “sculpt” something with your hands. You could reach inside your machine’s scanning unit and start recording the motions you make. The machine would interpret your movements and show you a 3D model representation of your hands modeling a block of clay in real time. Once you are satisfied with the result you could either print out a copy or open up a CAD file on your computer to tinker with the model further (in case precision is needed).

Quick sketch of device (using CAD then illustrator and a little imagination)

Physical Computing: Week 1


Lab 4:


Digital Input and Output with an Arduino

Here’s the code for the light switch lab (pictured above):

Note: Constant (const) creation not necessary just nice to know what pins I’m using could come in handy later…

const unsigned int LED_BIT0 = 3;
const unsigned int LED_BIT1 = 4;
const unsigned int BUTTON_PIN = 2;

void setup(){
pinMode(LED_BIT0, OUTPUT);
pinMode(LED_BIT1, OUTPUT);

void loop(){
if (digitalRead(BUTTON_PIN)==HIGH) {
digitalWrite(LED_BIT0, HIGH);
digitalWrite(LED_BIT1, LOW);
digitalWrite(LED_BIT0, LOW);
digitalWrite(LED_BIT1, HIGH);

Physical Computing: Week 1

Observing people interacting with technology:

  • Announcement Board in subway: not interactive in Crawford’s definition but interesting nonetheless
  • Subway Doors: system put in place to deal with people blocking the closing doors. Very much a New York thing
  • Elevators: similar system but doors stop before they crush you… interesting
  • Passed by Times Square: not a lot of interactivity but a ton of tech. If Times Square became interactive it would be even more overwhelming… Dangers of too much interactivity. Are our brains ready for this new era?
  • tv’s in taxi cab: interactive? meant to be a dialogue of information with limited thinking on the part of the computer… For me it’s more like Crawford’s fridge door example: I get in and immediately turn the tv off with no other interactivity
  • Reading a book: I think Crawford is wrong about this because he completely overlooks human psychology and the ability of humans to double. We are in fact having a conversation with oneself using the book as conversation stimulus. Nothing wrong with that with regards to Crawford’s definition of interactivity… At least not that I can think of.

Physical Computing: Week 1


The Art of Interactive Design:

Chris Crawford brings up some though provoking points about interactivity. Namely his point of view that interactivity is a competitive advantage which should not be diluted by an excessive focus on audio/visual presentation makes me think of video games. Video games are a relatively new medium and as of now the industry is focusing excessively on graphics,framerate,etc.

That being said, Crawford oversimplifies a lot of things in his arguments. For example, technological advances in graphics,etc. do in fact (when used wisely) augment immersion which can lead to better interactivity. Crawford himself admits that technological advances¬† led to lower computer response times and thusly more interactivity. When can one say: “ok we’re going fast enough?” or “this looks realistic enough?”

Also, what bothers me in Crawford’s writing is his need to categorize people and jobs. To me what’s exciting in Physical Computing and other interactive arts is precisely the fact that different educational backgrounds can mix. Truly interdisciplinary material is really exciting, but Crawford insists on creating a hierarchy of disciplines. He doesn’t quite say that art is better/more important/more noble than technology but we can tell which side of things he’s on, and ultimately he draws a distinction where the isn’t a need for one…