Updates from Amira Pettus Toggle Comment Threads | Keyboard Shortcuts
-
Amira Pettus
-
Amira Pettus
-
Amira Pettus
DATASWIRL CODE
/*
Pachube sensor client with StringsThis sketch connects an analog sensor to Pachube (http://www.pachube.com)
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or
the Adafruit Ethernet shield, either one will work, as long as it’s got
a Wiznet Ethernet module on board.This example has been updated to use version 2.0 of the Pachube.com API.
To make it work, create a feed with two datastreams, and give them the IDs
sensor1 and sensor2. Or change the code below to match your feed.This example uses the String library, which is part of the Arduino core from
version 0019.Circuit:
- Analog sensor attached to analog in 0
- Ethernet shield attached to pins 10, 11, 12, 13
created 15 March 2010
updated 16 Mar 2012
by Tom Igoe with input from Usman Haque and Joe Saavedrahttp://arduino.cc/en/Tutorial/PachubeClientString
This code is in the public domain.*/
#include <SPI.h>
#include <Ethernet.h>
#define APIKEY “hHJDUKi0wyPlbkwiGi-XihdqsCCSAKxjVjA3emFlRTJNZz0g” // replace your pachube api key here
#define FEEDID 57225 // replace your feed ID
#define USERAGENT “toilet brush 1.0” // user agent is the project name// assign a MAC address for the ethernet controller.
// fill in your address here:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
// fill in an available IP address on your network here,
// for manual configuration:
IPAddress ip(10,0,1,20);// initialize the library instance:
EthernetClient client;// if you don’t want to use DNS (and reduce your sketch size)
// use the numeric IP instead of the name for the server:
//IPAddress server(216,52,233,122); // numeric IP for api.pachube.com
char server[] = “api.pachube.com”; // name address for pachube APIunsigned long lastConnectionTime = 0; // last time you connected to the server, in milliseconds
boolean lastConnected = false; // state of the connection last time through the main loop
const unsigned long postingInterval = 10*1000; //delay between updates to Pachube.comint photocellPin = 0; // the cell and 10K pulldown are connected to a0
int photocellReading; // the analog reading from the analog resistor dividerint counter;
int timer;
unsigned long start;
unsigned long Total;
unsigned long finalTotal;
boolean checkFlag = false;
int lastphotovalue;
int flagTimer = 5000;void setup() {
// start serial port:
Serial.begin(9600);
// give the ethernet module time to boot up:counter = 0;
//pinMode(buttonPin, INPUT); //button
// pinMode(ledPin, OUTPUT); //LED
delay(1000);// start the Ethernet connection:
if (Ethernet.begin(mac) == 0) {
Serial.println(“Failed to configure Ethernet using DHCP”);
// DHCP failed, so use a fixed IP address:
Ethernet.begin(mac, ip);
}
}void loop() {
delay(10);
photocellReading = analogRead(photocellPin);
//Serial.print(“Analog reading = “);
//Serial.println(photocellReading);//Serial.print(“checkFlag: “);
//Serial.println(checkFlag);
//Serial.print(“reading: “);
//Serial.println(photocellReading);
//Serial.print(“flagTimer: “);
//Serial.println(flagTimer);//if (photocellReading > lastphotovalue + 50 && checkFlag == true && flagTimer > 3000) {
if (photocellReading > 250 && checkFlag == true && flagTimer > 3000 ){
Serial.println(” – Dark”);counter++;
Serial.print(“counter: “);
Serial.println(counter);
Total = millis()-start;
finalTotal = Total /1000 ;
Serial.print(“finalTotal: “);
Serial.println(finalTotal);
checkFlag = false;
/* Serial.println();
Serial.print(“—– duration: “);
Serial.println(finalTotal);
Serial.print(“—– count: “);
Serial.println(counter);
Serial.println();
*/
String dataString = “duration,”;
dataString += finalTotal;dataString += “\ndailyCount,”;
dataString += counter;sendData(dataString);
}// if (photocellReading +100 < lastphotovalue){
if(photocellReading < 150){
if(checkFlag == false){
Serial.println(” – Very bright”);
start = millis();
Serial.print(“start: “);
Serial.println(start);
}
//delay(500);
checkFlag = true;
}flagTimer = millis() – start;
lastphotovalue= photocellReading;
// if there’s incoming data from the net connection.
// send it out the serial port. This is for debugging
// purposes only:
if (client.available()) {
char c = client.read();
Serial.print(c);
}// if there’s no net connection, but there was one last time
// through the loop, then stop the client:
if (!client.connected() && lastConnected) {
Serial.println();
Serial.println(“disconnecting.”);
client.stop();
}// if you’re not connected, and ten seconds have passed since
// your last connection, then connect again and send data:
// if(!client.connected() && (millis() – lastConnectionTime > postingInterval)) {
// Serial.println();
// Serial.print(“—– duration: “);
// Serial.println(finalTotal);
// Serial.print(“—– count: “);
// Serial.println(counter);
// Serial.println();
//
// sendData(dataString);
// }
// store the state of the connection for next time through
// the loop:
lastConnected = client.connected();
}// this method makes a HTTP connection to the server:
void sendData(String thisData) {
// if there’s a successful connection:
if (client.connect(server, 80)) {
Serial.println(“connecting…”);
// send the HTTP PUT request:
client.print(“PUT /v2/feeds/”);
client.print(FEEDID);
client.println(“.csv HTTP/1.1”);
client.println(“Host: api.pachube.com”);
client.print(“X-PachubeApiKey: “);
client.println(APIKEY);
client.print(“User-Agent: “);
client.println(USERAGENT);
client.print(“Content-Length: “);
client.println(thisData.length());// last pieces of the HTTP PUT request:
client.println(“Content-Type: text/csv”);
client.println(“Connection: close”);
client.println();// here’s the actual content of the PUT request:
client.println(thisData);
}
else {
// if you couldn’t make a connection:
Serial.println(“connection failed”);
Serial.println();
Serial.println(“disconnecting.”);
client.stop();
}
// note the time that the connection was made or attempted:
lastConnectionTime = millis();
} -
Amira Pettus
-
Amira Pettus
Domains/ideas
Domains and Ideas for Last Project.
1.) Seriers of objects that comment on Internet of Things/ data gathering and analyzing…
toilet bowl cleaner / toilet / etc that sends data to Pachube.
2.) Interactive installation or game that deals with multi- cultural experiences/confusion
3.) Performance dealing with coming of age rituals -> specifically ones dealing with altering the body
4.) crossing borders ( Installation about trials of border crossing )
5.) Children loosing their mother tongue due to assimilation resulting in loss/change of identity ( installation)
-
Amira Pettus
Hardest part of the exercise was coming up with idea/concepts for projects.I STILL CANNOT COME UP WITH CONCEPTS….I HAVE A TOTAL BRAIN CLOG. Easy parts were coming up with domains for areas of interest. I general areas of interest but am having issues coming up with a strong concept of any kind minus my Pachube sarcastic commentary.
-
Nate
Thought you might enjoy the ridiculousness of this given your topic:
http://kohler.com/numi/#video.html
-
-
-
Amira Pettus
Heart Racer (The Game)
Heart Racer is a goal-based toy that tasks the user with learning how to control her own heart rate within a playful setting. When the game begins, the player picks a card at random from a stack. Each card has five circles, each set to either red or blue. The player must control her heartbeat to recreate the card’s color pattern on the Heart Racer device’s five LEDs. The player has ten seconds to affect each LED; a low heart rate turns the LED blue while a fast heart rate turns it red.
Friends with multiple Heart Racer devices can also compete by using the same card. The user whose Heart Racer most closely matches the pattern on the card wins that round.
Heart Racer uses the Pulse Sensor to take the user’s heartbeat. It also uses 5 Red-Green-Blue LEDs to show the user her current heart rate. Finally, it uses an Arduino as the microcontroller that brings all the parts of the project together.
Amira Pettus
Amira and Ramiro’s Midterm Journal 2 Entry
pictures above in order: 1. physical prototype 2. Code( next phase ) 3. Cards ( look and feel )to indicate patterns players should attempt to mimic using their BMP
In 4-8 sentences, Describe what how you will work on your prototypes between now in next class. What is left to do? What surprised you?
Between now and next class Ramiro and I will
1.) Implement and refine final physical protoype. —We will make 2 controllers so that there is the option to play against another person as well as yourself.
2.) Transfer our paper version patterns to actual cardstock — we will make a complete deck of patterns for our players to compete.
3.) Refine our code
Our materials to house our final version/hardware has been ordered and we await its arrival. We will be using a wooden casing to house our Arduino because of the look and feel it provides.( Also our metal version is conductive and interferes with the hardware.
Amira Pettus
Amira Anne Pettus MIDTERM_ Journal Entry 1
Project overview:
Originally a screen based game that allowed the player to manipulate their BPM in order to complete a time color matching game against a set pattern created by the computer.( BPM ranges matched up to specific colors which the player must discover and manipulate to match the computer’s color based patter.)
Physical Object: The game became physical and now the player has a handheld object embedded with RGB leds. The concept is the same,however instead of squares on the screen the colors of leds are changed depending on BPMs.
known and unknown challenge :
To make a game ,using the heart sensor, that one could play alone or with another person. There was some initial trouble with mapping the BPM to the color ranges as well as creating a range that the player could manipulate to change the colors of the boxes(LEDs).
AND PROGRAMMING.
surprising: How the project evolved from living on the screen to a physical object and the natural handheld shape it took on.
jewel/wildcard: When the project was screen based and the players competed against each other to match the computer generated pattern we had trouble thinking about how to make this aspect physical. The idea of cards with pattens came up and I believed fit in with the feel of the game nicely.
Amira Pettus
-
Amira Pettus
1.What was surprising about making your project?
Instead you using multiple separate LEDS I used a single RGB LED, I assumed that the methods for fading and flashing would be almost identical to single LEDS and I was mistaken. I learned that different colors are activated and are visible in different amount and trying to arrive at a single suitable color combination proved to be interesting.I thought it would be simple to come up with switches for transitioning between “moods” but the potentiometer I used is quite finicky. Instead of moving smoothly between each mood it is hard to determine how to be in specific sections of fading,flashing A and flashing B.
Amira Pettus
1st Post yeah!
1.) Amira Anne Pettus
3.) I have a B.S. from Georgia Tech in Science,Technology,and Culture.
4. I wanted to be in this class because I need to acquire practical skills that I can apply in the job market. I also would like to learn technical abilities so that I am able make physical objects/pieces.
Reply