cyborgowl
cyborgowl
Cyborg Owl
10 posts
Physical Computing projects made by Amy Wu taught by Eric Forman SVA Interaction Design MFA
Don't wanna be here? Send us removal request.
cyborgowl · 11 years ago
Text
Presence
Tumblr media Tumblr media Tumblr media
Presence was an interactive installation that visualized the ebb and flow of people at the SVA IxD studio. 
A physical button placed at the entrance way, inviting arrivers to simply push the + button to add a node to the geometric shape projected on the wall. And upon exiting, to push the – button to remove a node.
The projection speaks to how each person's presence has an impact on the living, changing shape of a larger community.
Presence was a collaboration with Matt Brigante and Melody Quintana.
Code on our arduino side:
//Define constant pins const int red = 5; const int ledPinR = 13; //Variables will change int ledStateR = HIGH; // the current state of the LED Pin 13 int buttonStateR; // the current reading from input pin 5 int lastButtonStateR = LOW; // the previous reading from input pin 5 long lastDebounceTimeR = 0; // the last time LED Pin 13 was toggled long debounceDelayR = 50; // the debounce time const int black = 6; const int ledPinB = 11; int ledStateB = LOW; int buttonStateB; int lastButtonStateB = HIGH; long lastDebounceTimeB = 0; long debounceDelayB = 50; void setup() { Serial.begin(9600); pinMode(red,INPUT); pinMode(ledPinR, OUTPUT); digitalWrite(ledPinR,ledStateR); // set initial LED state pinMode(black,INPUT); pinMode(ledPinB, OUTPUT); digitalWrite(ledPinB,ledStateB); } void loop() { //Read the state of the switch into a local variable int redVal = digitalRead(red); int blkVal = digitalRead(black); //if the red button changed, due to noise or pressing if (redVal != lastButtonStateR) { // reset the debouncing timer lastDebounceTimeR = millis(); } if (blkVal != lastButtonStateB) { lastDebounceTimeB = millis(); } if ((millis() - lastDebounceTimeR) > debounceDelayR) { // whatever the reading is at, //it's been there for longer than the debounce delay, //so take it as the actual current state //if the red button state has changed if(redVal != buttonStateR) { buttonStateR = redVal; //only toggle the LED if the new button state is HIGH if (buttonStateR == HIGH) { ledStateR = !ledStateR; Serial.println(redVal); } } } if ((millis() - lastDebounceTimeB) > debounceDelayB) { if(blkVal != buttonStateB) { buttonStateB = blkVal; if (buttonStateB == LOW) { ledStateB = !ledStateB; Serial.println(blkVal); } } } //set the LED digitalWrite(ledPinR, ledStateR); //save the reading. next time through the loop //it'll be the lastButtonStateR lastButtonStateR = redVal; digitalWrite(ledPinB, ledStateB); lastButtonStateB = blkVal; }
Code on our processing side:
//IMPORT LIBRARIES import quickhull3d.*; import ComputationalGeometry.*; import processing.serial.*; //DECLARE OBJECTS & VARIABLES Serial myPort; String data; //IsoWrap wrap; Wrapper wrap; int currentNodes; int nodesIncrease; int nodesDecrease; int arduinoVal; int currentColor; void setup() { currentNodes = 4; //set current number of nodes to starting number nodesIncrease = 1; //how much current nodes will increase when the button is pressed nodesDecrease = 1; currentColor = 255; size(1300, 900, P3D); //println(Serial.list()); String portName = Serial.list()[9]; //change the 0 to a 1 or 2 etc. to match your port myPort = new Serial(this, portName, 9600); myPort.bufferUntil('\n'); //Construct the iso wrap wrap = new Wrapper(this); // Add points for (int i=0; i<currentNodes; i++) { wrap.addPt( new PVector(random(-100, 100), random(-100, 100), random(-100, 100) ) ); } } void draw() { smooth(); background(0); lights(); float zm = 250; float sp = 0.01 * frameCount; camera(zm * cos(sp), zm * sin(sp), zm, 0, 0, 0, 0, 0, -1); stroke(currentColor); strokeWeight(1); noFill(); wrap.plot(); } void serialEvent(Serial p) { String inString = p.readString(); inString = trim(inString); arduinoVal = int(inString); println(arduinoVal); PVector v; v = new PVector(random(-100, 100), random(-100, 100), random(-100, 100) ); if (arduinoVal == 1){ currentNodes+= 1; println(currentNodes); addNode(); changeColor(); } else if (arduinoVal == 0){ currentNodes-= 1; println(currentNodes); subtractNode(); changeColor(); } } void addNode(){ PVector v = new PVector(random(-100, 100), random(-100, 100), random(-100, 100) ); wrap.addPt(v); } void subtractNode(){ wrap.removePt((int)random(0,wrap.ptset.size())); } void changeColor(){ if (currentNodes == 5){ currentColor = 100; } if (currentNodes == 6){ currentColor = 255; } if (currentNodes == 7){ currentColor = 150; } if (currentNodes == 8){ currentColor = 255; } if (currentNodes == 9){ currentColor = 100; } if (currentNodes == 10){ currentColor = 255; } if (currentNodes == 11){ currentColor = 150; } if (currentNodes == 12){ currentColor = 255; } if (currentNodes == 13){ currentColor = 100; } if (currentNodes == 14){ currentColor = 255; } if (currentNodes == 15){ currentColor = 150; } if (currentNodes == 16){ currentColor = 255; } if (currentNodes == 17){ currentColor = 100; } if (currentNodes == 18){ currentColor = 255; } if (currentNodes == 19){ currentColor = 150; } if (currentNodes == 20){ currentColor = 255; } if (currentNodes == 21){ currentColor = 100; } if (currentNodes == 22){ currentColor = 255; } if (currentNodes == 23){ currentColor = 150; } if (currentNodes == 24){ currentColor = 255; } if (currentNodes == 25){ currentColor = 100; } if (currentNodes == 26){ currentColor = 255; } if (currentNodes == 27){ currentColor = 150; } if (currentNodes == 28){ currentColor = 255; } if (currentNodes == 29){ currentColor = 100; } if (currentNodes == 30){ currentColor = 255; } if (currentNodes == 31){ currentColor = 150; } if (currentNodes == 32){ currentColor = 255; } if (currentNodes == 33){ currentColor = 100; } if (currentNodes == 34){ currentColor = 255; } if (currentNodes == 35){ currentColor = 150; } if (currentNodes == 36){ currentColor = 255; } if (currentNodes == 37){ currentColor = 100; } if (currentNodes == 38){ currentColor = 255; } if (currentNodes == 39){ currentColor = 150; } if (currentNodes == 40){ currentColor = 255; } if (currentNodes == 41){ currentColor = 100; } if (currentNodes == 42){ currentColor = 255; } if (currentNodes == 43){ currentColor = 150; } if (currentNodes == 44){ currentColor = 255; } if (currentNodes == 45){ currentColor = 100; } if (currentNodes == 46){ currentColor = 255; } if (currentNodes == 47){ currentColor = 150; } if (currentNodes == 48){ currentColor = 255; } if (currentNodes == 49){ currentColor = 100; } if (currentNodes == 50){ currentColor = 255; } if (currentNodes == 51){ currentColor = 150; } if (currentNodes == 52){ currentColor = 255; } if (currentNodes == 53){ currentColor = 100; } if (currentNodes == 54){ currentColor = 255; } if (currentNodes == 55){ currentColor = 150; } if (currentNodes == 56){ currentColor = 255; } if (currentNodes == 57){ currentColor = 100; } if (currentNodes == 58){ currentColor = 255; } if (currentNodes == 59){ currentColor = 150; } if (currentNodes == 60){ currentColor = 255; } if (currentNodes == 61){ currentColor = 100; } if (currentNodes == 62){ currentColor = 255; } if (currentNodes == 63){ currentColor = 150; } if (currentNodes == 64){ currentColor = 255; } if (currentNodes == 65){ currentColor = 100; } if (currentNodes == 66){ currentColor = 255; } if (currentNodes == 67){ currentColor = 150; } if (currentNodes == 68){ currentColor = 255; } if (currentNodes == 69){ currentColor = 100; } if (currentNodes == 70){ currentColor = 255; } if (currentNodes == 71){ currentColor = 150; } if (currentNodes == 72){ currentColor = 255; } if (currentNodes == 73){ currentColor = 100; } if (currentNodes == 74){ currentColor = 255; } if (currentNodes == 75){ currentColor = 150; } if (currentNodes == 76){ currentColor = 255; } if (currentNodes == 77){ currentColor = 100; } if (currentNodes == 78){ currentColor = 255; } if (currentNodes == 79){ currentColor = 150; } if (currentNodes == 80){ currentColor = 255; } if (currentNodes == 81){ currentColor = 100; } if (currentNodes == 82){ currentColor = 255; } if (currentNodes == 83){ currentColor = 150; } if (currentNodes == 84){ currentColor = 255; } }
Wrapper class code:
import processing.core.*; import quickhull3d.*; public class Wrapper implements PConstants{ PApplet theParent; ArrayList ptset; QuickHull3D hull; public Wrapper(PApplet _theParent) { theParent = _theParent; ptset = new ArrayList(); hull = new QuickHull3D(); } //---------------------------------------------------------------------------------------- public void addPt(PVector pt) { Point3d temp = new Point3d(pt.x, pt.y, pt.z); ptset.add(temp); } public void removePt(int index){ ptset.remove(index); } //---------------------------------------------------------------------------------------- public void addPts(PVector[] pts) { for (int i = 0; i < pts.length; i++) { Point3d temp = new Point3d(pts[i].x, pts[i].y, pts[i].z); ptset.add(temp); } } //---------------------------------------------------------------------------------------- public void plot() { Point3d[] set = new Point3d[ptset.size()]; for(int i=0;i<ptset.size();i++){ set[i] = (Point3d)ptset.get(i); } hull.build (set); Point3d[] vertices = hull.getVertices(); int[][] faceIndices = hull.getFaces(); for (int i = 0; i < faceIndices.length; i++) { theParent.beginShape(); for (int k = 0; k < faceIndices[i].length; k++) { Point3d v = vertices[faceIndices[i][k]]; theParent.vertex((float)v.x, (float)v.y, (float)v.z); } theParent.endShape(CLOSE); } } }
0 notes
cyborgowl · 12 years ago
Text
Air Pollution Sensor - Our Final Prototype - by Nga Nguyen and Amy Wu
Babies and young children are more susceptible to the exposure of air pollution and UV rays. Due to their growing bodies, “children breathe a proportionately greater volume of air than adults. As a result, children inhale more pollutants per pound of body weight”. Since they are too young to know the dangers and effects of their environment, our device will help parents become more aware of their child’s surroundings. The device detects how much dust and smoke particles is in the air. When the device is on, the blue light indicates it is working (low pollutants in the air). The two remaining states are a blinking yellow light to alert the parent of a medium range of pollution in the air around their baby, and lastly a red light with a warning sound from the buzzer to indicate high pollution within the air. The device would be attached within the vicinity of the child, such as on the crib, baby car seat, or carriage. The device is light-weight, wearable, and the compact size of the FLORA, the dust particle sensor, and the 3.7 V battery put together in a pouch format. This device would be useful for soon to be moms who would like to be made aware of their intake for two of air pollution, as well as any person who is concerned with what they might be breathing in, in a high polluted area.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
Above is a screenshot of our serial monitor, the numbers it is spitting out is the range our sensor was detecting. So where you see the jump to the 762 is where it detected smoke from the lighting of matches.
Background information on the coding side:  The tutorial we found most helpful for our sensor reading was from sensorapp. We combined that with the tone tutorial from the Arduino site.
And during our first prototyping phase, we tested with the Blink without delay tutorial, also from the Arduino site.
You can find our entire code in my past blog post here.
Once we got everything to work, we switched over to the FLORA and the FLORA RGB NeoPixel LED lights. We downloaded the NeoPixel library and followed the code on the Adafruit site.
This project was a collaboration with Nga Nguyen.
0 notes
cyborgowl · 12 years ago
Text
Air Pollution Sensor - Midterm Project Prototype
Tumblr media
Seen above, Nga and I soldered the optical dust sensor to 6 wires since our matching connector needed crimp pins, which we did not have. But firstly, we had break into our optical dust sensor to expose the 6 pins in order to solder them to our wires. We hot glue gunned over the soldered pins and wires since it was so difficult to solder the pins without touching the adjacent pins to the left and right of each pin. Unfortunately, the gun did not keep the delicate soldering in place (the wires came loose from the pins) and we did not take a video of the working prototype at the time (beginner's mistake!). 
Before the wires came loose from the soldering, we were able to get a range of values in the serial monitor of the arduino processing program, from about 150 (just sensing the air/particles in the VFL) to around the 700s when we blew smoke at the sensor. 
Tumblr media
The tutorial we found most helpful was this one from sensorapp. We wired accordingly and used the code, both worked seamlessly.
After we detected the range of air quality. We started to work on the output. We hooked up a speaker to digital 8 pin on the arduino and in our code we set a threshold for the pitch. So for values greater than or equal to 0 and less than or equal to 200 the speaker would beep a low pitch sound. And for values greater than or equal to 201 and less than or equal to 900, we multiplied the pitch by 2 to get a higher beep.
We started with the arduino tutorial for tone and reworked it using if and else statements.
This is our arduino code:
int dustPin=0; int dustVal=0; int ledPower=2; int delayTime=280; int delayTime2=40; float offTime=9680; #include "pitches.h" //int melody[] = { // NOTE_C4, NOTE_G3,NOTE_G3, NOTE_A3, NOTE_G3,0, NOTE_B3, NOTE_C4}; // note durations: 4 = quarter note, 8 = eighth note, etc.: int noteDurations[] = { 4, 8, 8, 4,4,4,4,4 }; void setup() { Serial.begin(9600); pinMode(ledPower,OUTPUT); pinMode(4, OUTPUT); /* // iterate over the notes of the melody: for (int dustVal = 0; dustVal < 300; dustVal++) { // to calculate the note duration, take one second // divided by the note type. //e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc. int noteDuration = 1000/noteDurations[dustVal]; tone(8, melody[dustVal],noteDuration); // to distinguish the notes, set a minimum time between them. // the note's duration + 30% seems to work well: int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); // stop the tone playing: noTone(8); } */ } void loop(){ // ledPower is any digital pin on the arduino connected to Pin 3 on the sensor digitalWrite(ledPower,LOW); // power on the LED delayMicroseconds(delayTime); dustVal=analogRead(dustPin); // read the dust value via pin 5 on the sensor if(dustVal >=0 && dustVal<=200){ tone(8, dustVal,100); }else if(dustVal >=201 && dustVal<=900){ tone(8, dustVal*2,500); } //int noteDuration = 1000/noteDurations[dustVal]; //tone(8, melody[dustVal],noteDuration); delayMicroseconds(delayTime2); digitalWrite(ledPower,HIGH); // turn the LED off delayMicroseconds(offTime); Serial.println(dustVal); delay(500); }
This is the arduino code for the class "pitches.h"
#define NOTE_B0 31 #define NOTE_C1 33 #define NOTE_CS1 35 #define NOTE_D1 37 #define NOTE_DS1 39 #define NOTE_E1 41 #define NOTE_F1 44 #define NOTE_FS1 46 #define NOTE_G1 49 #define NOTE_GS1 52 #define NOTE_A1 55 #define NOTE_AS1 58 #define NOTE_B1 62 #define NOTE_C2 65 #define NOTE_CS2 69 #define NOTE_D2 73 #define NOTE_DS2 78 #define NOTE_E2 82 #define NOTE_F2 87 #define NOTE_FS2 93 #define NOTE_G2 98 #define NOTE_GS2 104 #define NOTE_A2 110 #define NOTE_AS2 117 #define NOTE_B2 123 #define NOTE_C3 131 #define NOTE_CS3 139 #define NOTE_D3 147 #define NOTE_DS3 156 #define NOTE_E3 165 #define NOTE_F3 175 #define NOTE_FS3 185 #define NOTE_G3 196 #define NOTE_GS3 208 #define NOTE_A3 220 #define NOTE_AS3 233 #define NOTE_B3 247 #define NOTE_C4 262 #define NOTE_CS4 277 #define NOTE_D4 294 #define NOTE_DS4 311 #define NOTE_E4 330 #define NOTE_F4 349 #define NOTE_FS4 370 #define NOTE_G4 392 #define NOTE_GS4 415 #define NOTE_A4 440 #define NOTE_AS4 466 #define NOTE_B4 494 #define NOTE_C5 523 #define NOTE_CS5 554 #define NOTE_D5 587 #define NOTE_DS5 622 #define NOTE_E5 659 #define NOTE_F5 698 #define NOTE_FS5 740 #define NOTE_G5 784 #define NOTE_GS5 831 #define NOTE_A5 880 #define NOTE_AS5 932 #define NOTE_B5 988 #define NOTE_C6 1047 #define NOTE_CS6 1109 #define NOTE_D6 1175 #define NOTE_DS6 1245 #define NOTE_E6 1319 #define NOTE_F6 1397 #define NOTE_FS6 1480 #define NOTE_G6 1568 #define NOTE_GS6 1661 #define NOTE_A6 1760 #define NOTE_AS6 1865 #define NOTE_B6 1976 #define NOTE_C7 2093 #define NOTE_CS7 2217 #define NOTE_D7 2349 #define NOTE_DS7 2489 #define NOTE_E7 2637 #define NOTE_F7 2794 #define NOTE_FS7 2960 #define NOTE_G7 3136 #define NOTE_GS7 3322 #define NOTE_A7 3520 #define NOTE_AS7 3729 #define NOTE_B7 3951 #define NOTE_C8 4186 #define NOTE_CS8 4435 #define NOTE_D8 4699 #define NOTE_DS8 4978
We also tried to connect an LED light to the arduino. We wanted to make the LED light fade in and out according to the range of non-smoke and smoke particles in the air. However, we weren't able to get that to work (that is why we moved on to a sound output). The LED light did fade in and out, but the serial monitor stopped spitting out values. We could not get the two to work at the same time. So we weren't sure what range the LED light was fading in and out too... Overall we are pleased by our initial test trial. Back to the drawing board in terms of resoldering and making sure it stays put. Perhaps crazy glue as an alternative? Also we would like to have two outputs, the LED light and the beeping of the speaker. Perhaps we will have to have a parallel circuit between the two outputs since we only have one GND pin available in our arduino leonardo (the other two are used by the optical dust sensor). 
Ideally, for our final product, we would like to switch to the FLORA arduino (3.3V might be an issue), RGB LED light, and the speaker, and make a wearable device to be worn by babies, moms to be, or clipped onto the baby carriages or cribs.
Big THANK YOU to Tak (VFL)!
2 notes · View notes
cyborgowl · 12 years ago
Text
Midterm Project Proposal
I am partnering with Nga on this project. Our idea is the sensing of pollution and biofeedback.
Babies and young children are more susceptible to the exposure of air pollution and UV rays. Due to their growing bodies, "children breathe a proportionately greater volume of air than adults. As a result, children inhale more pollutants per pound of body weight". Since they are too young to know the dangers and effects of their environment, our device will help parents become more aware of their child's surroundings. 
The device will detect how much UV is emitted that day in the park, as well as dust and smoke particles in the air. This device will pulsate in a red color to alert the parent of the pollution in the air around their baby, as well as display the level of UV rays.
The device would be best suited to be worn by the baby, but also can be attached within the vicinity of the child, such as on the crib, baby car seat, or carriage. The device will be light-weight, pliable, and the size of the FLORA, led/glass, and the two sensors (dust particle sensor and the UV sensor). This device would also be useful for soon to be moms who would like to be made aware of their intake for two of air pollution. As well as for babysitters and grandparents. 
Input: Dust particle sensor and UV sensor Output: LED and B&W display
0 notes
cyborgowl · 12 years ago
Text
Project: Serial Communication
3-person collaboration between Michie, Melody, and myself. Our attempt at an Etcho A Sketch using Processing and Arduino.
Materials used: arduino, breadboard, USB port, two potentiometer, two 220 Ohm resistors, and lots of wires.
The set up on the breadboard and the Arduino:
Tumblr media
The code on the Analog side:
Tumblr media
The code on the Processing side:
import processing.serial.*; float x0; float y0; float leftPotPin; float rightPotPin; Serial myPort; void setup() { size(400,300); background(#FC0A0A); fill(175); rect(30,30,340,240); println(Serial.list()); myPort = new Serial(this, Serial.list()[6], 9600); myPort.bufferUntil('\n'); } void draw() { println("leftPotPin=" + leftPotPin); line(x0,y0,leftPotPin,rightPotPin); x0=leftPotPin; y0=rightPotPin; } void serialEvent(Serial myPort) { // get the ASCII string: String inString = myPort.readStringUntil('\n'); if (inString != null) { // trim off any whitespace: inString = trim(inString); float[] colors = float(split(inString, ",")); if (colors.length >=2) { // map them to the range 0-255: leftPotPin = map(colors[0], 0, 1023, 0, 255); rightPotPin = map(colors[1], 0, 1023, 0, 255); //blueValue = map(colors[2], 0, 1023, 0, 255); } } }
And the results:
Tumblr media
4 notes · View notes
cyborgowl · 12 years ago
Text
Environment Strobe No. 4 (1967) by Davide Boriani
Tumblr media
Environment Strobe No. 4 (1967) Ambiente Stroboscopico No. 4 (1967) by Davide Boriani Museo del Novecento in Milano, Italy
First you have to sign a waiver before entering the Programmed & Kinetic Art installations.
One enters a dark room where the entire floor is painted with green and red stripes (trippy!) and strobe red and green lights on the ceiling, with moving mirror walls that steers you along the confined space.
How it works: The walls are covered with mirrors. At the center, four panels are covered with mirrors, in order to restrict the amount of space the participant can walk. The floor consists of 12 platforms that have sensors on them which are also painted by alternating bands of red and green. In the ceiling there are four strobe lights, alternating between flashing red or green controlled by the sensors in the floor. The four central panels rotate as the participant walks, they all begin to rotate and stop when the set has reached one of the 16 programmed positions. The viewer enters at the center of a space.
A tactile experience (physical contact with the ground), contradicted by the effects of optical movement (illusion) and vibration of the flashes of red and green bands of complementary color of the floor.
Below are two images of Ambiente stroboscopico No. 3 (1967)
Tumblr media Tumblr media
0 notes
cyborgowl · 12 years ago
Text
if-else statement toy
In this week's assignment, we had to come up with a toy that uses an if() statement and preferably a variable resistor and lots of LED lights.
I made a "toy" out of cardboard and paper (the non computing stuff).
So how it works is when the threshold of the potentiometer is higher than 400 the stars comes out (the constellation turns on), and when it is lower than 400 the sun come out (turns on).
Materials used: Arduino Leonardo, potentiometer, breadboard, 2 resistors, micro USB plug, my laptop, 7 white LED lights (sun rays: 2 of them did not turn on after soldering...), 3 yellow LED lights, and wires galore.
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
cyborgowl · 12 years ago
Text
Two enhancements to my LED necklace
By using the Arduino Leonardo, I enhanced my LED necklace by making the LED lights blink every 30 seconds, as well as dimming the LED lights by turning the potentiometer up and down.
1 note · View note
cyborgowl · 12 years ago
Text
Analog In (dimming) with an Arduino
Tutorial: ITP Analog Input lab
Tumblr media Tumblr media
0 notes
cyborgowl · 12 years ago
Text
LED necklace
The project was to come up with an object that uses LEDs and a homemade switch.
The materials I used were: 5 red LED lights wire (white, black, and blue) 3V coin battery electric tape aluminum foil white yarn yellow vellum tape
My schematic sketch of the circuit:
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes