Research & Learning

Other Class pages

# Introduction to Physical Computing - Summer 2012

## Intro.ScottSummer2012 History

'''ASSIGNMENT'''
* Be excellent to each other.
* [[https://docs.google.com/document/d/1CMdrkP5Mnf_a57JeVW3pjIHrF57n0ss3dvibghmmar4/edit | self - test]]

Kristen arrays

[@
int sequence1[] = {
2, 5, 6, 10 , 12, 6, 6, 6 };
int delays1[] = {
250, 500, 60, 100, 120, 60, 60, 60 };

void setup(){

for(int i = 2; i < 13 ; i++) {
pinMode(i, OUTPUT);
}

}

void loop(){

if(piezoOne>175){

for(int i = 0; i < 9 ; i++) {
digitalWrite(sequence1[i], HIGH);
delay(20);
digitalWrite(sequence1[i], LOW);
delay(delays1[i]);

}

}

}

@]

DIY function
Wyna Pseudo code for steppers
[@
int numberOfSteps=0;

void setup(){

Serial.begin(9600);

}

void loop(){

if(numberOfSteps>10 && numberOfSteps<3000){

motor.steps(10);
numberOfSteps = numberOfSteps+10;
}
}
motor.steps(-10);
numberOfSteps = numberOfSteps-10;
}

}

}
!]
Changed lines 251-252 from:

to:
[@
int 555One=9;
int 555Two=10;
int 555Three=11;

void setup(){
//set all 555 pins as outputs

//turn one of the three on to start
digitalWrite(555Two, HIGH);
}

void loop(){
// do this forever
//do that thing to 555One
doThisThingOnce(555One);
}

//do that thing to 555Two
doThisThingOnce(555Two);
}
// do it to 555three
doThisThingOnce(555Three);
}
}

void doThisThingOnce(int whatPin){
digitalWrite(whatPin, HIGH);
delay(1000);
digitalWrite(whatPin, LOW);
delay(1000);

}
@]

'''Things we covered in class'''
* [[http://arduino.cc/en/Tutorial/ASCIITable | ASCII Table]] : Print out bytes, ASCII values, hex equivalents, etc.
* [[http://arduino.cc/en/Tutorial/Dimmer | Dimmer]] : dim an LED with Processing or Max by sending a series of bytes
* [[http://arduino.cc/en/Tutorial/PhysicalPixel | Physical Pixel]] : Turn an LED on or off with Processing or Max by sending a letter
* [[http://arduino.cc/en/Tutorial/VirtualColorMixer | Virtual Color Mixer]] : change the color of a program on your computer with 3 analog sensors. Uses ASCII anf comma separated values.
* [[http://arduino.cc/en/Tutorial/SerialCallResponse | Serial Call and Response]] : Handshaking with bytes
* [[http://arduino.cc/en/Tutorial/SerialCallResponseASCII | Serial Call and Response with ASCII]] : handshaking with ASCII

Changed lines 184-185 from:
** [[Labs/SerialDuplex | Lab]]: Multiple Serial Output
to:
* [[Labs/SerialDuplex | Lab]]: Multiple Serial Output
'''[[http://droolcup.com/itp/pcomp/summer12w3a.zip | Code From Class]]'''

Changed line 22 from:
* [[http://wynaliu.wordpress.com/ | Wyna]]
to:
* [[http://wyna-liu.tumblr.com/ | Wyna]]
Deleted lines 162-164:
'''PRESENT THIS CLASS:'''
* Stupid Pet Trick

'''PRESENT THIS CLASS:'''
* Stupid Pet Trick

Changed lines 145-147 from:
to:
'''[[http://droolcup.com/itp/pcomp/summer12w2b.zip | Code From Class]]'''

Changed lines 114-121 from:
to:
*[[http://www.instructables.com/id/Turn-a-pencil-drawing-into-a-capacitive-sensor-for | use a pencil drawing as a sensor]]
*[[http://jameco.com | jameco]]
*[[http://digikey.com | Digikey]]
*[[http://sparkfun.com | sparkfun]]

'''[[http://droolcup.com/itp/pcomp/summer12w2a.zip | Code From Class]]'''

Changed lines 112-114 from:
to:
*[[http://www.gammon.com.au/forum/?id=11473 | Arduino diagram and explanation]]

Changed lines 90-92 from:
to:
'''[[http://droolcup.com/itp/pcomp/summer12w1.zip | Code From Class]]'''

Changed lines 24-25 from:
to:
* [[https://snarfelopogus.wordpress.com/ | Alex]]
Changed lines 83-84 from:
* Norretranders, ''[[http://itp.nyu.edu/physcomp/readings/userillusion.pdf |The User Illusion]]'', Chapter 6: The Bandwidth of Consciousness ''If you can't access the reading, email me''
to:
* Norman, ''[[http://itp.nyu.edu/physcomp/readings/DesignOfEveryDayThings.pdf |Design of Everyday Things]]'', ch. 1
* Norman,
''[[http://www.jnd.org/dn.mss/emotion_design_at.html | Emotional Design]]'', Chapter 1, "Attractive Things Work Better".
Changed lines 146-148 from:
* Norman, ''[[http://itp.nyu.edu/physcomp/readings/DesignOfEveryDayThings.pdf |Design of Everyday Things]]'', ch. 1
* Norman,
''[[http://www.jnd.org/dn.mss/emotion_design_at.html | Emotional Design]]'', Chapter 1, "Attractive Things Work Better".
to:
* Norretranders, ''[[http://itp.nyu.edu/physcomp/readings/userillusion.pdf |The User Illusion]]'', Chapter 6: The Bandwidth of Consciousness ''If you can't access the reading, email me''
Changed lines 23-24 from:
* [[fran-pcomp.tumblr.com | Frances]]
to:
* [[http://fran-pcomp.tumblr.com | Frances]]
Changed lines 23-24 from:
to:
* [[fran-pcomp.tumblr.com | Frances]]
Deleted lines 79-86:

'''BLOG:'''
->Sensor walk.  Take a walk around your neighborhood, or a different one.  Take a count of every interaction with a sensor you see. These might include:
* Pushbuttons on an ATM
* motion sensors on doors, faucets, etc.
* Floor mats
* Cameras
->Take pictures or video as appropriate, of the most interesting ones.
Changed lines 99-107 from:
to:
'''BLOG:'''
->Sensor walk.  Take a walk around your neighborhood, or a different one.  Take a count of every interaction with a sensor you see. These might include:
* Pushbuttons on an ATM
* motion sensors on doors, faucets, etc.
* Floor mats
* Cameras
->Take pictures or video as appropriate, of the most interesting ones.

Changed lines 20-22 from:
to:
* [[http://laurieduke.wordpress.com/ | Laurie]]
* [[http://wynaliu.wordpress.com/ | Wyna]]

Changed lines 19-20 from:
to:
* [[http://kristenbarryphysicalcomputing.blogspot.com/ | Kristen]]
* [[http://www.jimcampbell.tv/portfolio/miscellaneous_references/ | Jim Campbell's formula for computer art]]
Deleted line 16:
Deleted line 20:
*  [[http://droolcup.com/itp/pcomp/senses-usvthem.jpg | Senses, us v computers ]]
Changed lines 229-230 from:
to:
Changed lines 8-9 from:
Physical Computing Resident: Anybody in the Resident's office! It's a free-for all! (As long as you ask politely)
to:

Physical Computing is an approach to learning how humans communicate through computers that starts by considering how humans express themselves physically. In this course, we take the human body as a given, and attempt to design computing applications within the limits of its expression.

To realize this goal, you'll learn how a computer converts the changes in energy given off by our bodies (in the form of sound, light, motion, and other forms
) into changing electronic signals that it can read interpret. You'll learn about the sensors that do this, and about very simple computers called microcontrollers that read sensors and convert their output into data. Finally, you'll learn how microcontrollers communicate with other computers.

Physical computing takes a hands-on approach, which means that you spend a lot of time building circuits, soldering, writing programs, building structures to hold sensors and controls, and figuring out how best to make all of these things relate to a person's expression.

Changed lines 227-231 from:
* finish the documentation for your final project.
to:
* finish the documentation for your final project.

Changed lines 44-46 from:
to:
* [[Labs/Switches | Lab]]: Switches

Changed line 32 from:
!!!Week 1 : Getting to know your Arduino. Hello Everything!
to:
!!!Week 1 : Electricity, Hello Arduino!
Changed lines 37-40 from:
** Microcontrollers and sensors in the everyday environment
* Analog vs. Digital
* [[http://www.tigoe.net/pcomp/code/controllers/input-output/digital-input-output| Digital Input and Output
]]
to:
* [[http://www.tigoe.net/pcomp/code/circuits/understanding-electricity| Understanding Electricity]]
Deleted line 38:
* Intro to [[http://www.arduino.cc/|Arduino]] and first program.
Changed lines 43-44 from:
* [[Labs/DigitalInOut | Lab:]] first Arduino program
to:
* [[Labs/Electronics | Lab]]: Electronics
Changed lines 48-49 from:
* [[https://itp.nyu.edu/signup/day.php?area=1 | Sign up]] for two days of [[http://itp.nyu.edu/physcomp/Policy/Cleanup | shop cleaning]].
to:

'''BLOG:'''
->Observation
. Pick a piece of interactive technology in public, used by multiple people. Write down your assumptions as to how it's used, and describe the context in which it's being used. Watch people use it, preferably without them knowing they're being observed.  Take notes on how they use it, what they do differently, what appear to be the difficulties, what appear to be the easiest parts. Record what takes the longest, what takes the least amount of time, and how long the whole transaction takes. Consider how the readings from Crawford reflect on what you see.

* Crawford, ''[[http://library.books24x7.com/book/id_4587/toc.asp | The Art of Interactive Design]]'', chapters 1 and 2 (note: you will need to sign into NYUHome to view this. From your NYUHome home page, click "Research" then "books24x7.com" then search for "The Art of Interactive Design" by Chris Crawford. Alternately, try [[http://library.books24x7.com/bookmark.asp?bookid=4587|this link]]. )  '''For those without Books24x7 access, you can also find the readings on Google Books [[http://books.google.com/books?id=lefh5rSLbVUC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false | here]].'''

!!!!Class 2

'''CONCEPTS:'''
** Microcontrollers and sensors in the everyday environment
* Analog vs. Digital
* [[http://www.tigoe.net/pcomp/code/controllers/input-output/digital-input-output| Digital Input and Output]]
* Intro to [[http://www.arduino.cc/|Arduino]] and first program.

'''LABS:'''
* [[Labs/DigitalInOut | Lab:]] first Arduino program

Deleted lines 73-77:

* Jim Campbell's [[http://www.jimcampbell.tv/portfolio/miscellaneous_references/ | "Formula for Computer Art"]]
* [[http://www.zambetti.com/projects/resistulator/ | Resistulator]] :the resistor color code tool I mentioned
* [[http://fritzing.org/ | Fritzing]] for making pretty circuit diagrams
Changed lines 76-86 from:
* Crawford, ''[[http://library.books24x7.com/book/id_4587/toc.asp | The Art of Interactive Design]]'', chapters 1 and 2 (note: you will need to sign into NYUHome to view this. From your NYUHome home page, click "Research" then "books24x7.com" then search for "The Art of Interactive Design" by Chris Crawford. Alternately, try [[http://library.books24x7.com/bookmark.asp?bookid=4587|this link]]. )  '''For those without Books24x7 access, you can also find the readings on Google Books [[http://books.google.com/books?id=lefh5rSLbVUC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false | here]].'''

!!!!Class 2

'''CONCEPTS:'''

'''LABS:'''

to:
* Norretranders, ''[[http://itp.nyu.edu/physcomp/readings/userillusion.pdf |The User Illusion]]'', Chapter 6: The Bandwidth of Consciousness ''If you can't access the reading, email me''
Deleted lines 79-88:

* Arduino [[http://arduino.cc/en/Reference/HomePage | Programming Reference]]
*[[http://sparkfun.com | Sparkfun]]
*[[http://jameco.com | Jameco]]
*[[http://digikey.com|Digikey]]
Changed line 82 from:
!!!Week 2 : Back to the Physical
to:
!!!Week 2 : Going beyond digital
Changed lines 88-89 from:
* [[http://www.tigoe.net/pcomp/code/circuits/understanding-electricity| Understanding Electricity]]
to:
Changed lines 91-97 from:
* [[Labs/Electronics | Lab]]: Electronics

* Norretranders, ''[[http://itp.nyu.edu/physcomp/readings/userillusion.pdf |The User Illusion]]'', Chapter 6: The Bandwidth of Consciousness ''If you can't access the reading, email me''

to:

Deleted lines 132-183:
* [[http://www.moma.org/visit/calendar/exhibitions/1080 | Talk to Me]] at the MOMA

'''CODE FROM CLASS'''
[@
/*
Serial RGB LED controller
by Tom Igoe
Controls an RGB LED whose R, G and B legs are
connected to pins 11, 9, and 10, respectively.
*/
// constants to hold the output pin numbers:
const int greenPin = 9;
const int bluePin = 10;
const int redPin = 11;
int currentPin = 0; // current pin to be faded
int brightness = 0; // current brightness level
void setup() {
// initiate serial communication:
Serial.begin(9600);
// initialize the LED pins as outputs:
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// if there's any serial data in the buffer, read a byte:
if (Serial.available() > 0) {
// respond to the values 'r', 'g', 'b', or '0' through '9'.
// you don't care about any other value:
if (inByte == 'r') {
currentPin = redPin;
}
if (inByte == 'g') {
currentPin = greenPin;
}
if (inByte == 'b') {
currentPin = bluePin;
}
if (inByte >= '0' && inByte <= '9') {
// map the incoming byte value to the range of the analogRead() command
//because our LEDs are common anode, we invert the values in the map() function
brightness = map(inByte, '0', '9', 255, 0);
// set the current pin to the current brightness:
analogWrite(currentPin, brightness);
}
}
}
@]

Changed lines 146-148 from:
'''BLOG:'''
->Observation. Pick a piece of interactive technology in public, used by multiple people. Write down your assumptions as to how it's used, and describe the context in which it's being used. Watch people use it, preferably without them knowing they're being observed.  Take notes on how they use it, what they do differently, what appear to be the difficulties, what appear to be the easiest parts. Record what takes the longest, what takes the least amount of time, and how long the whole transaction takes. Consider how the readings from Norman and Crawford reflect on what you see.
to:
'''LABS:'''
** [[Labs/SerialDuplex | Lab]]: Multiple Serial Output
Deleted lines 151-152:
* Continuing Serial communication part 2
** [[http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors|stepper motors]]
Deleted lines 160-162:
** [[Labs/SerialDuplex | Lab]]: Multiple Serial Output

'''LABS:'''
Changed lines 181-214 from:
'''FROM CLASS'''
We looked at how we can control the motor digitally (like in the "Blink" example) and with variable speeds.

Here's some code for controlling a motor attached to pin 9 with a pot, or other analog input :
[@

int potPin = 0;    // The pot or senor is on Analog input pin 0
int sensorValue = 0;  // value read from the analog sensor
int motorPin = 9;    // PWM pin that the transistor is on.  n.b. PWM 0 is on digital pin 9

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
// declare the motor pin as an output:
pinMode(motorPin, OUTPUT);
}

void loop() {

// map the sensor value from the 10-bit input range (0-1023)
// to the output range (0-255).
int motorSpeed = sensorVal/4;

analogWrite(motorPin, motorSpeed);  // set the motor speed  with the result
Serial.println(motorSpeed);  // print the motorSpeed value back to the debugger pane (0-255)
delay(10);                    // wait 10 milliseconds before the next loop
}

@]

to:
Deleted lines 183-184:
** [[http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors|stepper motors]]
Changed lines 192-193 from:
!!!Week 5 : Additional concerns, wireless communication
to:
!!!Week 5 : Additional concerns, other types of wireless communication
Changed lines 202-203 from:
* Mopping up, checking on any outstanding issues on what we covered so far. Final project reports.
to:
* Final project reports, interface proposals. Bring in a prototype interface for your final project. To be discussed further in class.
Changed line 214 from:
* Final Project
to:
* Final Project demonstrations
(:title Introduction to Physical Computing - Summer 2012 :)

21 May - 29 June 2012\\
Instructor: Scott Fitzgerald (scott.fitzgerald at nyu.edu)\\
Class Hours: Tuesday & Thursday, 6:30p - 9:25p\\
Office Hours: TBA

Physical Computing Resident: Anybody in the Resident's office! It's a free-for all! (As long as you ask politely)

!! Student Blogs
If you don't send your blog to me, everyone will know when they come to this page! Massive public shaming to follow!\\

!! Supplies

See [[http://itp.nyu.edu/physcomp/Intro/Supplies]] for a description of what you're getting. [[http://www.adafruit.com/products/170 | Kits]] (supplied by [[http://www.adafruit.com/ | adafruit]]) are for sale at the NYU computer store for ~\$90. It will include pretty much everything you'll need to do the basic classwork.

Some additional supplies are available in the shop, and feel free to use what is in there. However, dont go overboard (using an LED or 2 is fine, using 100 for your Glow-o-tron is not).

!!Schedule

As we have fewer (but longer!) course meetings, we will follow the regular course, but lose some time for the final project.

The syllabus is broken down into:

* '''Concepts''' we'll discuss in class.  Course notes are linked so you can read them before class, to know what we're talking about.
* '''Lab exercises''' that illustrate the concepts. You're not required to show your lab work in class, but do them each week to learn, and come in with questions if you have any.  If you did something you're proud of, feel free to bring it in, though this is optional.
* '''Production assignments''' larger assignments which have scheduled times you'll be expected to show them in class.
* '''Reading''' to be read in the week they're assigned.  Will come up in discussion the week after, usually.
* '''Blog assignments''' Writing the week when it's assigned. Will come up in class from time to time. Read each other's stuff too.
* '''Due dates''' for production assignments

!!!Week 1 : Getting to know your Arduino. Hello Everything!
!!!!Class 1
'''CONCEPTS:'''
* What is Physical Computing?
** Microcontrollers and sensors in the everyday environment
* Analog vs. Digital
* [[http://www.tigoe.net/pcomp/code/controllers/input-output/digital-input-output| Digital Input and Output]]
* Intro to [[http://www.arduino.cc/|Arduino]] and first program.
* How to [[http://mightyohm.com/files/soldercomic/FullSolderComic_EN.pdf | solder something]] (PDF)

'''LABS:'''
* [[Labs/DigitalInOut | Lab:]] first Arduino program

'''ASSIGNMENT:'''
* Join the [[Main/List| physcomp listserve]]
* Send me a link to your blog, and I will post it here.
* [[https://itp.nyu.edu/signup/day.php?area=1 | Sign up]] for two days of [[http://itp.nyu.edu/physcomp/Policy/Cleanup | shop cleaning]].

'''BLOG:'''
->Sensor walk.  Take a walk around your neighborhood, or a different one.  Take a count of every interaction with a sensor you see. These might include:
* Pushbuttons on an ATM
* motion sensors on doors, faucets, etc.
* Floor mats
* Cameras
->Take pictures or video as appropriate, of the most interesting ones.

* Jim Campbell's [[http://www.jimcampbell.tv/portfolio/miscellaneous_references/ | "Formula for Computer Art"]]
* [[http://www.zambetti.com/projects/resistulator/ | Resistulator]] :the resistor color code tool I mentioned
* [[http://fritzing.org/ | Fritzing]] for making pretty circuit diagrams

* Crawford, ''[[http://library.books24x7.com/book/id_4587/toc.asp | The Art of Interactive Design]]'', chapters 1 and 2 (note: you will need to sign into NYUHome to view this. From your NYUHome home page, click "Research" then "books24x7.com" then search for "The Art of Interactive Design" by Chris Crawford. Alternately, try [[http://library.books24x7.com/bookmark.asp?bookid=4587|this link]]. )  '''For those without Books24x7 access, you can also find the readings on Google Books [[http://books.google.com/books?id=lefh5rSLbVUC&printsec=frontcover&source=gbs_ge_summary_r&cad=0#v=onepage&q&f=false | here]].'''

!!!!Class 2

'''CONCEPTS:'''

'''LABS:'''

'''ASSIGNMENT:'''
->Fantasy Device. Think of a fantasy device you've always wanted.  Doesn't have to be physically possible, but it has to have a physical interface.  Design what the physical interface was.  Document your design on your blog, and bring it in for the class. Your mock-up doesn't have to work, and it can be made out of any materials you're comfortable with.  Make this a quick sketch, just enough so that your classmates have a sense of what they would do to use your device.

* Arduino [[http://arduino.cc/en/Reference/HomePage | Programming Reference]]
*[[http://sparkfun.com | Sparkfun]]
*[[http://jameco.com | Jameco]]
*[[http://digikey.com|Digikey]]

!!!Week 2 : Back to the Physical
!!!!Class 3
'''PRESENT THIS WEEK:'''
* Fantasy Device

'''CONCEPTS:'''
* [[http://www.tigoe.net/pcomp/code/circuits/understanding-electricity| Understanding Electricity]]

'''LABS:'''
* [[Labs/Electronics | Lab]]: Electronics

* Norretranders, ''[[http://itp.nyu.edu/physcomp/readings/userillusion.pdf |The User Illusion]]'', Chapter 6: The Bandwidth of Consciousness ''If you can't access the reading, email me''

!!!!Class 4

'''CONCEPTS:'''
* [[http://www.tigoe.net/pcomp/code/controllers/input-output/analog-output|analog output]]
** pulsewidth modulation
*Sound out

'''LABS:'''
* [[Labs/Servo | Lab]]: servo/analog out
* [[Labs/ToneOutput | Lab]]: Tone output

* Graham Pullin, ''[[http://itp.nyu.edu/physcomp/readings/Design_meets_disability.pdf|Design Meets Disability]]''

'''ASSIGNMENT:'''
->Stupid Pet Trick.  Make a simple physically interactive device that uses the skills you've learned in the labs. It must respond to a physical action or series of actions a person takes, and it must be amusing, surprising, or otherwise engaging.It doesn't have to be practical, or complex, as long it shows that you understand the basics of digital and analog I/O and how to use them. If you're unfamiliar with the term "stupid pet trick," Googling the term may provide you inspiration for the tone of this project.

->Examples:
* a love-o-meter, a device that tells you what a good lover you are, based on how it measures some action you take
* a combination lock, a device whose response is "unlocked" by a specific series of actions in a particular order from the user
* a light mixer, a device that mixes colors of light from some analog input (to simplify, use LEDs as lights)
* a tone mixer, same concept as the light mixer, but that mixes audible tones

!!!Week 3 : Talk to me! Communication with other things
!!!!Class 5
'''DISCUSS PET TRICKS!'''

'''CONCEPTS:'''
* [[http://www.tigoe.net/pcomp/code/communication/serial-communication|serial communication]] week 1
** graphing a sensor

'''LAB:'''
* [[Labs/SerialOut | Lab]]: Serial Output

* Norman, ''[[http://itp.nyu.edu/physcomp/readings/DesignOfEveryDayThings.pdf |Design of Everyday Things]]'', ch. 1
* Norman, ''[[http://www.jnd.org/dn.mss/emotion_design_at.html | Emotional Design]]'', Chapter 1, "Attractive Things Work Better".

* [[http://www.moma.org/visit/calendar/exhibitions/1080 | Talk to Me]] at the MOMA

'''CODE FROM CLASS'''
[@
/*
Serial RGB LED controller
by Tom Igoe
Controls an RGB LED whose R, G and B legs are
connected to pins 11, 9, and 10, respectively.
*/
// constants to hold the output pin numbers:
const int greenPin = 9;
const int bluePin = 10;
const int redPin = 11;
int currentPin = 0; // current pin to be faded
int brightness = 0; // current brightness level
void setup() {
// initiate serial communication:
Serial.begin(9600);
// initialize the LED pins as outputs:
pinMode(redPin, OUTPUT);
pinMode(greenPin, OUTPUT);
pinMode(bluePin, OUTPUT);
}
void loop() {
// if there's any serial data in the buffer, read a byte:
if (Serial.available() > 0) {
// respond to the values 'r', 'g', 'b', or '0' through '9'.
// you don't care about any other value:
if (inByte == 'r') {
currentPin = redPin;
}
if (inByte == 'g') {
currentPin = greenPin;
}
if (inByte == 'b') {
currentPin = bluePin;
}
if (inByte >= '0' && inByte <= '9') {
// map the incoming byte value to the range of the analogRead() command
//because our LEDs are common anode, we invert the values in the map() function
brightness = map(inByte, '0', '9', 255, 0);
// set the current pin to the current brightness:
analogWrite(currentPin, brightness);
}
}
}
@]

!!!!Class 6
'''PRESENT THIS CLASS:'''
* Stupid Pet Trick

'''CONCEPTS:'''
* [[http://www.tigoe.net/pcomp/code/communication/interpreting-serial-data-bytes| serial communication]] week 2
** multiple sensors
** Interpreting bytes: ASCII vs. binary
** handshaking/call-and-response

'''BLOG:'''
->Observation. Pick a piece of interactive technology in public, used by multiple people. Write down your assumptions as to how it's used, and describe the context in which it's being used. Watch people use it, preferably without them knowing they're being observed.  Take notes on how they use it, what they do differently, what appear to be the difficulties, what appear to be the easiest parts. Record what takes the longest, what takes the least amount of time, and how long the whole transaction takes. Consider how the readings from Norman and Crawford reflect on what you see.

!!!Week 4 : Controlling high current loads, making things move
!!!!Class 7
'''CONCEPTS:'''
* Continuing Serial communication part 2

* [[http://www.tigoe.net/pcomp/code/circuits/motors| high current loads and motors]]
** [[http://www.tigoe.net/pcomp/code/circuits/motors/controlling-dc-motors|controlling DC Motors]]
* Dustyn's writing on:
** [[http://itp.nyu.edu/physcomp/readings/ch02_DRedit.pdf|Materials: what to choose and where to get]]

'''LABS:'''
** [[Labs/SerialDuplex | Lab]]: Multiple Serial Output

'''LABS:'''
** [[Labs/DCMotorControl | HBridge Lab]]

'''ASSIGNMENT:'''
->Final project. Create a physically interactive system of your choice. Your focus in this assignment should be on careful and timely sensing of the relevant actions of the person or people that you're designing this for, and on clear, prompt, and effective response. Any interactive system is going to involve systems of listening, thinking, and speaking from both parties. Whether it involves one cycle or many, the exchange should be engaging.

->Document your work thoroughly online as you go. Include details of all phases of the project. Include a project summary as well, explaining what the system you built is, what it does, and what purpose it's intended to serve. Your summary should introduce the project.

->A few examples:

->Musical Instruments. Performing music involves a sustained engagement between the performer and the instrument. The feedback fro mthe instrument has to be immediate and clear in order for the performer to continue playing. The interface has to be flexible so that the musician can exercise her creativity in playing, but has to have some boundaries so that she knows what the instrument can do and what it can't do.

->Game interfaces. Like musical instruments, they involve constant back-and-forth interaction and immediate response. They are often simpler than musical instruments. In fact, the standard game controller has gotten so standard that the action of many games is artificially adapted to the needs of the controller, not the physical expressiveness of the player. Pick a specific game and see if you can change that.

->Assistive devices. Whether it's something as simple as a reaching device (think of pickle pickers) or something more complex, these devices are very demanding of clear, reliable response.

->Remote control systems. They require not only a clear interface, but must also return enough information on the remote system's action to let you know that you're doing the right thing. Whether it's a remote controller for your home electrical devices or a Mars rover controller, the need for clarity and good feedback are equally essential to the person who it's made for.

->There are many other good applications for this project. Discuss the specifics of yours with Scott.

'''FROM CLASS'''
We looked at how we can control the motor digitally (like in the "Blink" example) and with variable speeds.

Here's some code for controlling a motor attached to pin 9 with a pot, or other analog input :
[@

int potPin = 0;    // The pot or senor is on Analog input pin 0
int sensorValue = 0;  // value read from the analog sensor
int motorPin = 9;    // PWM pin that the transistor is on.  n.b. PWM 0 is on digital pin 9

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
// declare the motor pin as an output:
pinMode(motorPin, OUTPUT);
}

void loop() {

// map the sensor value from the 10-bit input range (0-1023)
// to the output range (0-255).
int motorSpeed = sensorVal/4;

analogWrite(motorPin, motorSpeed);  // set the motor speed  with the result
Serial.println(motorSpeed);  // print the motorSpeed value back to the debugger pane (0-255)
delay(10);                    // wait 10 milliseconds before the next loop
}

@]

!!!!Class 8
'''CONCEPTS:'''
** [[http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors|stepper motors]]

* complex data communications
** configuration vs. communication (command move vs. data mode)
** Bluetooth serial as example
** protocols discussion
** [[Labs/Bluetooth | Optional Bluetooth Lab]]

!!!Week 5 : Additional concerns, wireless communication

!!!!Class 9
* Mopping up, checking on any outstanding issues on what we covered so far.

'''BLOG:'''
* Final Project concept.  Explain the concept of your final project online.  Write it and/or illustrate it so that readers who are not in this class can get a clear and concise idea of what you plan to make for the final.

!!!!Class 10
* Mopping up, checking on any outstanding issues on what we covered so far. Final project reports.

'''BLOG:'''
* describe the technical system for your final project.

!!!Week 6 : Holy Mackerel, this is already over?
!!!!Class 11
* final project workshop.  Discuss any technical issues

!!!!Class 12
* Final Project

'''BLOG:'''
* finish the documentation for your final project.
 Edit | View | History | Print | Recent Changes | Search Page last modified on June 28, 2012, at 08:19 PM