The counter counts to thirty in groups of ten. The first ten presses of the switch are counted by the red light, presses 11-20 are counted by the red and green light combined, and presses 21-30 are counted by all three lights combined. When the counter reaches 30, the three LED’s oscillate rapidly back and forth until the counter is reset at 0. There should be video and code on here, I do not understand why. I hate wordpress. I will consult Jerry.
February 29, 2008
February 28, 2008
3: LadyAda Tutorials
Documentation of tutorials (unable to post until now):
Simple circuit, three LED’s

Simple switch

Alternating switch

Alternating switch w/ changing 3 LED’s

/*
Alternating switch
*/
int switchPin = 2; // switch is connected to pin 2
int ledPin = 13; // led is connected to pin 13
int val; // variable for reading the pin status
int buttonState; // variable to hold the last button state
void setup() {
pinMode(switchPin, INPUT); // Set the switch pin as input
pinMode(ledPin, OUTPUT); // set the led pin as an output
Serial.begin(9600); // Set up serial communication at 9600bps
buttonState = digitalRead(switchPin); // read the initial state
}
void loop(){
val = digitalRead(switchPin); // read input value and store it in val
if (val != buttonState) { // the button state has changed
if (val == LOW) { // check if the button is pressed
Serial.println("Button just pressed");
digitalWrite(ledPin, LOW);
} else { // the button is not pressed
Serial.println("Button just released");
digitalWrite(ledPin, HIGH);
}
}
buttonState = val; // save the new state in our variable
}
Midterm Proposal: BOOMBOXES
PROPOSAL:
Currently, I am working on a SURG grant involving music and social interaction. Before taking the class, the project only consisted of an outdoor seating space with built in speakers to plug an mp3 player into. To better understand, here’s the SURG Proposal pdf.
The space will be composed of several benches varying in size that users can move and manipulate according to their needs. In the Google SketchUp pic below, you can get a rough idea about how the space will function.
Although the picture doesn’t show it, there will be cables running from all the individual benches into a main station (the tallest block in the pic). The main station is where the user can dock their iPod and make their song selection. There will be a mini stereo plug for non-iPod users as well, although information gathered from here will be more limited but more on that later.After choosing the song, the user will then see the bench begin react to the music. Individual benches will have strips of LEDs horizontally going up the side of the bench, much like an equalizer bar. Each individual bench will display the levels and ‘dance’ along with the music and thus encouraging others to as well. Meanwhile, the Arduino will gather additional information from the iPod and upload the Artist and Track titles. As a researcher, I can then easily see what is being played and during what time of day anywhere I have access to the internet. The benches will become a social gathering area and an interactive installation by giving a space where students can interact with each other and music. They will even be able to remotely interact with the bench by checking the online status of what’s going on through something like Twitter.
MIDTERM PROPOSAL:
My plan for next Thursday is to get the Arduino talking to an iPod, as well as getting it online. Using the Ethernet Shield sold by Ladyada, I will connect the Arduino through an ethernet cable and Twitter some actions coming from the iPod. If all goes well, by next week, I will be able to send simple commands to an iPod through programming, have the Arduino Twitter something like “The iPod is playing music” or “The iPod just changed tracks” As a bonus, I hope to use the LM3915 IC to get the level meter and 10 LED indicator to function as well.
The CODE SKETCH will be something like this:
If voltage of Analog Input 1 is above 1, then song is playing.
If song is playing, Twitter “A song is playing”
Wait until song is changed.
When track changes, Twitter “The song has changed”
When music stops and voltage is 0, nothing is connected.
If nothing connected, Twitter “Nothing connected”
This seems a bit simple, but I think the coding and adapting the awesomely cool Botanicalls Twitter code will be a large part of the project and a huge step towards the final project. The level indicator does not interface with the Arduino but it will be going all the while.
Midterm Proposal: Piece of a 3D Mirror
Abstract:
My goal for this semester is to develop the foundations of a 3D mirror. Ultimately, I imagine this as a grid of hundreds of small blocks that would each move to “reflect” a point over a
complementary sensor grid. In this sense, each block would act as a pixel on a screen, except
instead of changing color they change height. So for the midterm I’m breaking it down to
just two blocks and two IR range sensors.
Code Sketch:
- Set servos to starting position
- Check inputs of range finders
- Convert input voltages into linear values
- If linear values fall within defined range, then move servos according to values
- If not, return servos to starting position
Parts:
Arduino
2 x Servo Motor
2 x GP2D120 IR Range Sensors
Gears
Wiring
Building Material (haven’t decided on this yet)
Drawings and Circuit Schematics:
(pdf)
2: Term Project Idea
Project Idea (not project proposal)
Im interested in how technology can be used to create natural, ephemeral interior environments. I like the idea of using the arduino, simple electronics and coding to create spatial environments that evoke natural reactions and encourage the viewer to engage their senses on some sort of phenomenological level. My idea right now is to use a network of constantly fluctuating leds to create an interior “cloud” that would hang above some public space. The “cloud”
would be composed of a flexible web-like structure that loosely holds thousands of movable leds, and would be embedded with sensors that would react to the number of people/ movement of people in the space below. Like a cloud, the complex web of leds would be constantly shifting and creating new spatial environments, and inspiring viewers to project their own perceptions of what the cloud looks like onto structure. The idea is still pretty loose and vague, I will have to address how each led, or smaller systems of leds actually move and what kind of underlying structure will need to be fabricated.
1: Post Something Interesting
So I am finally able to post to the site…
1: Post Something Interesting
Inspiration:
Installation artist Olafur Eliasson does work that explores the relationship between nature and technology through rebuilding fragments of the environment in the gallery.
“His materials are elemental and ephemeral: light, heat, moisture, steam, and ice are manipulated by the artist towards aesthetic ends and in response to a specific site. His work navigates a space between nature and technology, the organic and the industrial. For Eliasson, immaterial sensations such as temperature, smell, taste, air and magnetic waves become sculptural elements when presented in an art context.”
Some examples:
Your Negotiable Panorama, 2006

Notion Motion, 2005

The Weather Project, 2003

Beauty, 1993

7: Mid Term Project Proposal
Mid Term Project Proposal: VEXFAB (Ventilated Exterior Fabric)
Written Description
I want to design and build a jacket which based on the body temperature can adjust the amount of ventilation provided by the jacket, creating a more comfortable experience for the user when walking through areas with large temperature variances.
Inputs: Temperature between jacket and body (different locations)
Outputs: Moving vents/slits in clothing
Implementation: I aim to do this with a mixture of temperature sensors connected in a feedback loop along with muscle wire to provide actuation of the vents.



Parts List:
Nitinol Muscle Wire
Arduino Microcontroller
External Power source (for the wires)
External Power Source (for the Arduino Chip)
Regular highly conductive wire
Crimp fasteners to attach wire to wire
Variable Intensity LEDs (for testing)
Mesh Fabric
Jacket to cut up X1
Switch X1
Temperature sensors (thermistors) X4
Switching Transistors X4
Resistors
Code Sketch
Check Inputs of various thermistors
Translate input voltages into temperatures for reference
Based on PRESET temperature, check if temperature is greater than or less than input temperature
If temp is less than preset, close vent
If temp is greater than preset, open vent
Return to step one and repeat
References of similar projects
In this website I found a couple of shape memory garments http://www.xslabs.net/work.html , they seem to do a lot of work with wearable electronics. Here are some examples of work by them.
http://www.xslabs.net/work-pages/kukkia.html
http://www.xslabs.net/work-pages/vilkas.html
http://www.xslabs.net/skorpions/
car-chasing killbot [midtermproject]
My project proposal should you choose to accept it is a car-chasing killbot. It will be used to tail cars then eliminate the target once the target stops the car. Technically it’s a small-scale automated taillight-chasing trike (see crude sketch).
State Diagram (in words…):
It will start out in CHASE mode where it will follow a moving light target. It will stop if it senses an obstruction and will back up if it senses the car is reversing towards it. It will go into KILL mode when the light it is following suddenly goes away without the proximity sensor input changing, which will indicate that the car is now turned off. It will solenoidally deploy a missile mounted on its back (not in sketchy sketch) towards the car, the trajectory for which will be determined by the proximity (trajectory fixed; bot will move to desired distance). It will finally go into RUN AWAY mode when the light level suddenly increases (changes are all defined threshold-relative), implying that either the car blew up or there’s cops!
Algorithm:
Initially I thought Left Sensor HIGH à RUN Right Motor, but possible multiple light sources would mess that up, so I’ve opted to go with Left Sensor LOW à RUN Left Motor. The bot will aim direct at the light source when the light sensor inputs are equal. The proximity sensor will keep it from chasing light through glass windows and getting run over by the target car going in reverse to foil attempted murder.
Code Sketch:
while(state==chase) {
while(prox>=threshold.prox) {
follow light // naturally center-aiming
if(light.prev – light.current > threshold.light1) {state=kill}
}
back up
}
while(state==kill) {
from last proximity input, go to specified distance
deploy missile! // this is in while loop since ultimately i want it to keep shooting
if(light.current – light.prev > threshold.light2) {state=retreat}
}
while(state==retreat) {
retreat?
}
Parts List:
- 2x L/Rwheels
- 1x back wheel (castor)
- 2x DC motors
- 3x light sensors
- 1x proximity sensor
- 1x solenoid
- 1x missile
Wiring:
- 2x H-bridges
- 1x power supply (12V?)
- transistors, diodes, resistors
Wiring Schematic:
This is in progress. I need to figure out (ask) how to supply varying input voltages from an external source…