Midterm Project Pitches:
Ting, Peiqi, Max- FB use on the floor, hourglass?
Donna, Sergio, Allison- Device middle-ware
Rios, Esteban- Graffiti Bag
Adam, Sam, Xuedi- High Five beacon
Jon, Karl, Surya- Phone number, lock box, social game, treasure hunt
Natasha- Hue light switch, or small button for behavior training
Attach: Nest Smoke Alarm - http://nest.com/


Javascript is heavily dependent on events occurring. You get to pass functions around, not just numbers and data.

Deliberately not using frameworks like SpaceBrew and Temboo, even though they are great.

Arduino with accel attached to the analog pins, Using a common anode (rather than common cathode) Cathode returns negative ions

RGBLED's- all three color pins set to HIGH so that they are turned off. if (currentPin !=0) - return a string for brightness

RGBLEDControl (Arduino sketch)

Send in /r/127 or /g/34 (sending in the value for the LED)

Started up a server on his machine in node. Then went to localhost:8080 and got color sliders for the RGB LED jQuery is a tool for making browser requests

The Document/Object model is important. It's a document that contains objects. Awesome.

"ui" is the thing that he passed in through "setColor"

Before, every time we move the slider, it's sending a request to the server. Here we're setting up a web socket, so we stay connected the whole time.

  • You can give a key a function as its value

NodeJS is a command line driven environment

     You write a script you're going to run
     You write a package.json - describes the libraries you're going to be using
     You write the files you're going to serve (i.e. index
     You write a ReadME file to explain how to use it all

NPN - node package manager

We've got an environ that gives us the opportunity to set up a computer as a server. And now we can use the browser as…

  • Doug Crawford book is probably the best resource to learn node/JS

console.log is your printLn of JS

app.get/output* means get anything that comes after "output"

Node is running the application Node's http library is listening on the port for http requests Express gives us the capability of RESTian route scheme Everything is happening in events. And handlers like app.get let us control/define the events

Restian Models rely on the fact that when I make an http request, a string is that request, and it gets parsed by the server.

  • We have a common interaction lang for desktop, cell phones, etc. where we have a keyboard/mouse scenario.

We don't have a common lang for networked communication particularly when one of the devices does not have a rich display interface. And that is a great paradigm changing/setting opportunity for us right now. (Tom's current thesis)

The idea of a call back - when you run a function and it's complete, it returns a call back(a next function in response).


BridgeRestRGB Arduino Sketch

listenOnLocalhost - only respond to clients that they've served

If the Yun server sees the word "arduino" called, it knows that the string that follows it carries information that needs to be parsed logically to make the request.