Intro to Physical Computing Syllabus

Research & Learning

Other Class pages

Shop Admin

ITP Help Pages
Tom's pcomp site
DanO's pcomp site


Introduction to Physical Computing - Fall 2009

Instructor: Rory Nugent (rory.nugent at nyu.edu)
September 9th - December 9th 2009
Class Hours: Wednesday, 6:30 - 9:00p and Thursday, 6:30 - 9:00p
Office Hours: https://itp.nyu.edu/inwiki/Signup/Rory

Weekly Slides

Links

Syllabus
Lab Assignments
Tom Igoe's Physical Computing Site
Tom Igoe's Code and Resources Blog
ITP Sensor Workshop Wiki

Helpful Books

Student Blogs

Wednesday Class

Garrad Bradley
Jason W. Aston
Joshua Kleiner
Keng-Fu Chu
Khairani Barokka
Lucas Werthein
Marko Manriquez
David Miller
Michael Lewis
Michael Doherty
Poram Lee
Qian Liu
Scott Wayne Indiana
Nico Hsieh
Yimeng Bai
Yoon Ju Cho
Sooyun Yun

Thursday Class

Adebunmi Adeleke
Aiwen Wang-Huddleston
Chika Iijima
Christopher Langer
Dawn Hayes
Jasmine Youssef
Kody Trauger
Laewoo Kang
Mark Triant
MinWoo Bae
Neil Hickey
Sandeep Ravindranath
Sarah Jenny
Seth Garrison
Yang Liu
Marie Genevieve Cyr (*)
Sofy Yuditskaya
Chris Anthony

Final Project

  • Wednesday Groups
    • Group One
      • Jason
      • Lucas
    • Group Two
      • Scott
    • Group Three
      • Soo Yun
      • Poram
    • Group Four
      • Okka
    • Group Five
      • Nico
    • Group Six
      • Mike Lewis
      • Mike Doherty
    • Group Seven
      • Marko
      • Mike Doherty
    • Ground Eight
      • Michelle
      • Fu
    • Group Nine
      • Garrad
    • Group Ten
      • Josh
    • Group Eleven
      • Yoon Ju
    • Group Twelve
      • Yimeng
  • Thursday Groups
    • Group One
      • Bunmi
      • Jasmine
    • Group Two
      • Aiwen
    • Group Three
      • Chika
      • Leo
    • Group Four
      • Chris L.
      • Neil
    • Group Five
      • Dawn
    • Group Six
      • Kody
    • Group Seven
      • Mark
    • Group Eight
      • Minwoo
    • Group Nine
      • Sandeep
    • Group Ten
      • Sarah
    • Group Eleven
      • Seth
    • Group Twelve
      • Yang
    • Group Thirteen
      • Marie
    • Group Fourteen
      • Sofy
    • Group Fifteen
      • Chris A.

Weekly Notes

Week One

Blinking LED
// The following example code will blink an LED attached on pin 2

int ledPin = 2;  // the led is connected on pin 2

void setup()
{
  // set up the ledPin as an output
  pinMode(ledPin,OUTPUT);
}

void loop()
{
  digitalWrite(ledPin,HIGH);  // turn the LED on
  delay(1000);                // pause for 1 second (1000 ms)
  digitalWrite(ledPin,LOW);   // turn the LED off
  delay(1000);                // pause for 1 second (1000 ms)

  // rinse and repeat
}
LED switch control
// The following example code will turn an LED on and off based on
// the activity of a button switch

int ledPin = 2;      // an LED will be attached on pin 2
int switchPin = 3;   // a switch will be attached on pin 3
int switchState = 0; // a temporary variable for storing the switch state

void setup()
{
  pinMode(ledPin,OUTPUT);    // set up the LED pin as an output
  pinMode(switchPin,INPUT);  // set up the switch pin as an input
}

void loop()
{
  // read in the current state of the switch
  switchState = digitalRead(switchPin);

  if(switchState == HIGH)       // if the switch is pressed...
  {
    digitalWrite(ledPin,HIGH);  // turn the LED on
  }
  else                          // if the switch is NOT pressed...
  {
    digitalWrite(ledPin,LOW);   // turn the LED off
  }

  // rinse and repeat
}

Week Two

Print the analog readings from a potentiometer
// The following example code will read in the analog voltage from
// a potentiometer and print the values (0 - 1023) to your serial monitor

int potPin = 0;        // the potentiometer is connected on analog pin 0
int analogValue = 0;   // a variable to store the analog values

void setup()
{
  Serial.begin(9600);  // configures serial communication at 9600 bps (bits per second)
}

void loop()
{
  analogValue = analogRead(potPin);  // reads in the analog voltage and saves it to a variable
  Serial.println(analogValue);       // prints the analog value from the Arduino to your computer's serial monitor
  delay(10);                         // pause 10 milliseconds, this will keep your Arduino from slamming your computer with messages
}
LED Light Dimmer

// The following example code will read in the analog voltage from
// a potentiometer and send it out to an LED on an analog out pin.
// The effect is that the LED will change brightness as your turn
// the knob of the potentiometer.

int potPin = 0;    // the potentiometer is connected on analog pin 0
int ledPin = 3;    // the LED is connected on digital PWM pin 3
int potValue = 0;  // a variable to store the analog value of the pot

void setup()
{
  Serial.begin(9600);        // configures serial communication at 9600 bps (bits per second)
  pinMode(ledPin, OUTPUT);   // set the LED pin as an output
}

void loop()
{
  potValue = analogRead(potPin);      // reads in the analog voltage and saves it to a variable

  Serial.println(potValue);           // prints the analog value from the Arduino to your computer's serial monitor

  analogWrite(ledPin, potValue / 4);  // sends out an analog voltage related to the analog input voltage from the pot
                                      // The analog input range is 0 - 1023 and the analog output range is 0 - 255 so you must divide by 4 for scaling  
  delay(10);                          // pause 10 milliseconds, this will keep your Arduino from slamming your computer with messages
}

Week Three

Week Four

Tone Generator

// The following example code will read in an analog reading from a potentiometer
// and use the reading to control the timing in which a small 8-ohm speaker is pulsed

int potPin = 0;        // the potentiometer is connected to analog pin 0
int speakerPin = 2;    // the speaker is connected to digital pin 2

int analogValue = 0;

void setup()
{
  pinMode(speakerPin,OUTPUT);  // define the speaker pin as an output, obviously
}

void loop()
{
  analogValue = analogRead(potPin);   // read an analog value fro the potentiometer
  analogValue = map(analogValue, 0, 1023, 1912, 3830);  // map the analog input range 0 - 1023 to the range that defines the frequency timing for an octave of notes

  digitalWrite(speakerPin,HIGH);  // turn the speaker pin on
  delayMicroseconds(analogValue); // delay for a certain amount of microseconds
  digitalWrite(speakerPin,LOW);   // turn the speaker pin off
  delayMicroseconds(analogValue); // delay for the same amount of microseconds

  // funny enough, turning the speaker pin on and off very quickly at a certain rate will cause the speaker to generate a tone
}

Week Five

Week Six

Week Seven

  • Serial Examples including how to send single sensor data in multiple formats, sending multiple sensor data in multiple formats, call-and-response, handshake, and Rory's Etch-A-Sketch.

Week Nine

  • LessEMF - a great site for a lot of important materials for soft circuits
  • How To Get What You Want - documentation, techniques, and circuits for soft circuitry

Week Ten

Configuring an Xbee: The Arduino Method
void setup()
{
}

void loop()
{
  delay(1);
}

Week Twelve

  Edit | View | History | Print | Recent Changes | Search Page last modified on January 05, 2011, at 05:13 PM