Saturday, September 13, 2008

this blog is moving!

I am switching over to WordPress on my own domain - lehrblogger.com - for a variety of reasons including but not limited to: curiosity about WordPress, annoyances with the Blogger interface, and love for the new domain name (Gabriela deserves credit for the idea). I hope you and your RSS feeds will follow me there!

(It should be up and running, with all of the old posts and comments transfered.)

Wednesday, September 10, 2008

ICM - HW1

I made a simple processing sketch that goes through the first few iterations of a Koch Snowflake as a way to brush up on recursion and experiment with algorithmic graphics. Check it out at OpenProcessing.

Tuesday, September 9, 2008

AJAX - HW1

The JavaScript for my first Assignmentt for the AJAX class is at
    http://lehrburger.com/ajax/lehrburger_hw1.js
and the assignment is at
    http://formconstant.net/introspect/syllabus/

Tuesday, July 1, 2008

Sociable Objects - Tick Tock Tock

My final project for my first ITP class involved the automated manipulation of time to improve a user's behavior in coordinating with other people. People are often late, and in an effort to make themselves less late they set their watches and clocks fast. This causes people to think that they have less time than they actually do, and as a result they hurry more and are less late, which is theoretically good for everyone.

This approach is imperfect, however, because the person who set his/her clock fast would know how fast it was and would account for that adjustment in subconscious judgments of how much time they had to complete the given task. The alternative method of "closing your eyes and holding down the button" is still imperfect, since the offset is then random and not necessarily useful. People are also not always in a hurry, and a fast clock in those situations can be inconvenient. Finally, the delusion about the actual time becomes even more fragile when other clocks are involved that either display the correct time or were randomly set to a different incorrect time.


The goal of my project was to prototype an immersive and dynamic delusion about time. I would use the XBee radios to synchronize the time between multiple devices, and Arduinos would interface with the XBees and handle displaying that time. I would use a sensor on a watch device to gauge the user's stress level - measures of galvanic skin response, heart rate, speed of motion, and watch-checking-motions were considered. Then each device in the network would then offset its own current time by an amount that was a function of the user's stress level. (Note there is an alternative possibility of slowing down time as the user got more stressed in an effort to calm him/her down. Both this laid-back and the other approach have interesting psychological consequences, but the fundamental techincal details are the same.)

Thus, as the user got more stressed, time would speed up, the user would hurry more, become more efficient, and would be less late. As the user calmed down again, the offset would slowly return to zero and the time would return to its accurate setting. (The function calculating the offset would approach a limit to prevent the problem of a positive feedback loop.) Changes would be gradual enough to go unnoticed by the occasional observer, and thus the user would act as if the time displayed on the devices was correct.


I made substantial progress in the implementation of this device network. I hacked a digital watch so that it was possible to set its time from an Arduino by rapidly sending high voltage pulses to the button contacts in the same pattern as a person would use to set the watch. I configured a serial LCD screen to receive and display a time and date (in the same manner as an alarm clock) and keep its own internal count of the time. My computer was then able to send out a time and date to the other two devices, and they would then set their own times to be (roughly) in sync with the computer. After the initial times were set, the watch could then instruct the LCD to change its time by a specified offset (I ran into difficulties setting the System Time in Mac OS X using Processing, but it would work in theory) corresponding to a users stress level. Accurate gauging of an individual's stress level is a project in and of itself (including calibration for each person), so a simple push button was used as a placeholder for that signal.

Additional work on the project could include multiple types of devices (how would one accurately set an analog wall clock without being able to see the hands) and the introduction of multiple users into the system (what's a clock to do if one person in the room is stressed, and the other is not).

Arduino code for Watch
Arduino code for SerialLCD
Processing code for Computer

Following are the slides that I used for my in-class presentation, a demo video of the entire project, a demo video of only the watch component, and several images.

























Monday, June 16, 2008

Sociable Objects - Rock Paper Scissors

For this assignment, Armanda and I each built a circuit with an Arduino, an XBee radio, four switches, and several LEDs to play the game Rock Paper Scissors.

Play proceeds as follows: one player selects a choice using one of the switches, the choice is transmitted to the other player, an LED lights up on the other player's board to indicate to the second player that the first player is waiting to receive a choice from the second player, the second player chooses a score that is transmitted to the first player, and when each player has the other players score a light indicates what the other player has chosen. An additional light on each board indicates the winner - if there is a tie then both lights are on, otherwise thxe winner is the player with the illuminated light, and either player can press a New Game switch to reset his own game and tell the other player to reset.

We extended the project to build a third circuit to keep score of the game. A third Arduino and XBee were used with a modification of the Binary Counter project I had built before. Each board keeps track of its own score and transmits that score to the scorekeeper when the New Game button has been pressed. Scores up to 16 for each player are indicated on two sets of four LEDs.


The Arduino code for each the two players is online here, and the code for the scorekeeper is online here



Video with scorekeeper:


Video without scorekeeper:






Friday, May 30, 2008

Sociable Objects - Glow That LED

For this assignment, Amanda and I each built a circuit with an Arduino, an XBee radio, a potentiometer, and several LEDs. They were paired such that adjusting the potentiometer on one brightens or dims an LED on the other.

The assignment was based heavily on the exercises in Chapter 6 of Tom Igoe's book Making Things Talk (amazon).

The Arduino code is online here.











Wednesday, May 28, 2008

cell phone signal strength mapping

it would be interesting to have a map that told me where in the city my cell signal was actually strongest. perhaps a phone or similarly-capable device could be hacked to simply record signal strength and location (determined by accelerometer (???) and triangulation from cell towers)

presence monitoring at ITP

in class today there was discussion of various notification systems for ITP students about the state of particular systems on the floor (the foosball table, free food, etc). text messages provide a pretty easy way to do this, but the system would need a way of knowing not to bother notifying people who were not on the floor

since access to the floor happens (almost?) exclusively through the elevator and adjacent stairwell, it might be feasible to use this bottleneck to make note of people entering and leaving. Rob mentioned previous attempts to have someone swipe a card, but it seems an E(lectronic )A(rticle )S(urveillance) system similar to those used in retail stores to protect against shoplifters might work well. the units cost one or two thousand dollars new, but they've been around for a while so maybe older/cheaper models are available. then each student could carry an RFID or similarly purposed chip in his/her wallet, and the scanners could note when that person passes through (without, of course, making the noise)

a pretty powerful API could be created for the system that other students could build on. it would be useful to be able to query the system about whether a certain person was on the floor or not (this might avoid the privacy concerns that people had with BlueWay), and individuals could sign up for the notifications that interested them.

Tuesday, May 27, 2008

Binary Counter

As a side project, I put together a circuit that counts the number of times a switch has been pressed in binary. It displays the count using a row of six LEDs, and was built/written using the Arduino Button and Loop examples as a starting point. The Arduino code is online here.


Physical Computing - Lab 2

Lab from: http://itp.nyu.edu/physcomp/Labs/DigitalInOut


Prepare the breadboard -



Add a Digital Input (a switch) -



Add Digital Outputs (LEDs) -



Program the Arduino -







Get Creative -








Physical Computing - Lab 1

Lab from: http://itp.nyu.edu/physcomp/Labs/Electronics

Part 1 -
The voltage between the power and the ground rows on the breadboard was approximately 4.92V, with about 12V coming from the adapter socket.






Part 2 -
The voltage across the first resistor was approximately 3V. The voltage across the LED was approximately 1.9V. These do have a sum that is approximately the total voltage in the circuit.





Part 3 -
The voltage across the first LED was approximately 2.52V and the voltage across the second LED was approximately 2.48V. These are nearly the same, as expected. Three LEDs in series do light, but they are less bright because each receives only approximately 1.6V.





Part 4 -
In parallel, the LEDs each have the total voltage of approximately 4.9V (4.94V, 4.94V, and 4.92V were measured). The amperage drawn by the LEDs was approximately 20 milliamps.







Part 5 -
The potentiometer drew between 0V and 2.98V, depending on the setting.




potential project idea

from Jan Chipchase's blog Future Perfect:
The everyday places that we linger will start to take on a new relevance with the widespread adoption of devices equipped with proximate wireless connectivity - Bluetooth, RFID, WiFi, ..., when the simple act of lingering creates opportunities for meaningful data exchange.
http://www.janchipchase.com/blog/archives/2008/05/the_small_crowd.html