As computing becomes more ubiquitous in our objects, designers need to be more aware of how to design meaningful interactions into electronically enhanced objects. At the University of Washington, a class of junior Interaction Design majors is exploring this question. These pages chronicle their efforts.
Showing posts with label Plantarduino. Show all posts
Showing posts with label Plantarduino. Show all posts

Friday, June 13, 2014

Code and Diagram

Controlling a servo with a tact switch, and LED blinking tied to moisture sensor.






// Latest code June 4th
‪#‎include‬ <Servo.h>
Servo servoMain; // Define our Servo
const int buttonPin = 2; // the number of the pushbutton pin
// variables will change:
int buttonState = 0;
int pos = 0; // variable to store the servo position
int sensorPin = A0; // select the input pin for the potentiometer
int sensorValue = 0; // variable to store the value coming from the sensor
const int led = 13; // turn on
const int led2 = 3; // blinking
int ledState = LOW; // ledState used to set the LED
long previousMillis = 0; // will store last time LED was updated
long interval = 1000;
void setup() {
// declare the ledPin as an OUTPUT:
Serial.begin(9600);
pinMode(led, OUTPUT);
pinMode(led2, OUTPUT);
servoMain.attach(10); // servo on digital pin 10
pinMode(buttonPin, INPUT);
servoMain.write(90);
}
void loop() {
sensorValue = analogRead(sensorPin);
delay(1000);
Serial.print("sensor = " );
Serial.println(sensorValue);
if (sensorValue <= 200) { //350-390 range => blinking
digitalWrite(led, LOW);
// Only allowed button to be pressed if no water
// read the state of the pushbutton value:
//buttonState = ;
if (digitalRead(buttonPin) == 1) { // Ground
Serial.println(buttonState);
Serial.println(buttonPin);
servoMain.write(0);
delay(5000);
servoMain.write(90);
delay(500);
} else {
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval) {
// save the last time you blinked the LED
previousMillis = currentMillis;
// if the LED is off turn it on and vice-versa:
if (ledState == LOW) {
ledState = HIGH;
} else {
ledState = LOW;
}
digitalWrite(led2, ledState);
}
}
} else if (sensorValue >= 350) {
digitalWrite(led2, LOW); // turn off the other LED first
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
} else {
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
}
}

Laser Cutting Taller Objects (over 2" and up to 9" or so)

An interesting complication in building the Plantarduino box was that we put it together too soon and it became hard to make decisions later. We were too constrained by the form unless we wanted to build a new one. Later we realized we could use the box but we needed to laser cut  it assembled.

After talking and checking out a few laser cutters, we learned that we couldn't cut anything that was taller than a few inches. The box was 7" tall when on its side.

One night that we were working in the metals shop, I look closer at the laser cutter and noticed that you can remove the material holding tray completely and stick a 10" tall object! I then modified the Z axis on the computer program and voila! We did a incision on out 7" tall box!!!

I put a block of wood in the box to protect the bottom from the laser and it was a good idea because the laser did reach all the way through.




Final Video - Daniel/Chip




Chip and I took a simple and mundane task, watering a house plant, and separated the basic steps and put them on extreme ends. Conceptually it is a wireless interaction, but this version is wired. So the concept is about watering a plant remotely and about the interactions it could create. 

On one end, the user (user A) can have the visuals and the presence benefits of owning a plant, but user A can’t water the plant, nor touch it, and it difficult to tell when it needs watering.

On the other end (User B), the user has the satisfaction of keeping this plant alive, but s/he can’t see it.

This broken communication structure can motivate the involved ones to seek communication between them. 

Other situations in which this concept could be used are : 

-Kids plant caring
-Traveling and away from plant

In the video, Chip realizes he could use a concept like his to have a new level of interact with his host dad.