Art,Ecology and Technology
From Wiki
Contents |
Syllabus
The course will look at new ways of intervening in the environment, with scientists,engineers and public policy makers. We will construct and embed 5 devices to monitor the environment.
About
People
Abdul
Devashish
Vishnu
Nitya
Ramya
Lara
Manasi
Shikhar
Akshataa
Uditi
Priyanka
Sandeep
Swati
kannan
alannah
dhruv nawani
Mrunmayee
Saurabh Levin
sachin basu
Neeraj Dugar
Sayantoni
Nikhil
Rohan Gupta
Bharath Haridas
Dhruv Chakkamadam
Abrar Burk
Divya
SMOKE SIGNAL
Diary
Connecting a Gas Sensor to an Arduino board
Connecting LDR and a Servo motor to an Arduino board
Connecting Processing to Pacube
import processing.serial.*;
import eeml.*;
Serial arduino;
float myValue;
float lastUpdate;
DataOut dOut;
void setup()
{
println(Serial.list());
arduino = new Serial(this, Serial.list()[0], 9600);
//dOut = new DataOut(this, 5210);
dOut = new DataOut(this,"http://www.pachube.com/api/feeds/2312.xml","0531d736725e0a42d10452fca831d27faa83568c7025b3143c34776ba5f4bbef");
dOut.addData(0,"light sensor, LDR, light level");
}
void draw()
{
if (arduino.available() > 0) {
myValue = arduino.read();
// println(myValue);
}
if ((millis() - lastUpdate) > 2000){
println("ready to PUT: ");
dOut.update(0, myValue);
int response = dOut.updatePachube();
println(response);
lastUpdate = millis();
}
}
/*
void onReceiveRequest(DataOut d){
d.update(0, myValue);
}
*/
</pre>
Connecting Pachube to Processing
// Basic example to retrieve data from an existing Pachube feed
//
// See many other methods available to the DataIn object here:
// http://www.eeml.org/library/docs/eeml/DataIn.html
import eeml.*;
DataIn dIn;
void setup(){
// set up DataIn object; indicate the URL you want, your Pachube API key, and how often you want it to update
// e.g. every 15 seconds
dIn = new DataIn(this,"http://www.pachube.com/api/504.xml", "0531d736725e0a42d10452fca831d27faa83568c7025b3143c34776ba5f4bbef", 15000);
}
void draw()
{
// do whatever needs doing in the main loop
}
// onReceiveEEML is run every time your app receives back EEML that it has requested from a Pachube feed.
void onReceiveEEML(DataIn d){
float myVariable = d.getValue(1); // get the value of the stream 1
println(myVariable);
}
Code for Arduino
/*
* AnalogInput
* by DojoDave <http://www.0j0.org>
*
* Turns on and off a light emitting diode(LED) connected to digital
* pin 13. The amount of time the LED will be on and off depends on
* the value obtained by analogRead(). In the easiest case we connect
* a potentiometer to analog pin 2.
*
* http://www.arduino.cc/en/Tutorial/AnalogInput
*/
int potPin = 0; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int val = 0; // variable to store the value coming from the sensor
void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
Serial.begin(9600);
}
void loop() {
val = analogRead(potPin)/4; // read the value from the sensor
Serial.print(val,BYTE);
digitalWrite(ledPin, HIGH); // turn the ledPin on
delay(100); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delay(100); // stop the program for some time
}
Changeing the frequency of the sine wave using a Bend sensor
Code for Processing
import processing.serial.*;
Serial myPort; // The serial port
PFont font;
// initial variables:
int i = 1; // counter
int inByte = -1; // data from serial port
void setup () {
size(500, 650); // window size
font = loadFont("ArialMT-72.vlw");
// List all the available serial ports
println(Serial.list());
// I know that the third port in the serial list on my mac // is always my Keyspan adaptor, so I open Serial.list()[2]. // Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[0], 9600);
// set inital background:
background(255); }
void draw () {
if (myPort.available() > 0) {
inByte = myPort.read();
println(inByte);
serialEvent();
}
}
void serialEvent () {
// draw the line:
stroke(0,0,255);
line(i, height, i, height - inByte);
textFont(font, 72);
fill(255);
stroke(255);
rect(0, 0, width, 70);
fill(0);
text(inByte, 125, 60);
// at the edge of the screen, go back to the beginning:
if (i >= width) {
i = 0;
background(255);
}
else {
i++;
} }
Code for Arduino
int FlexPin = 0; // LED connected to digital pin 13
void setup() // run once, when the sketch starts
{
Serial.begin(9600);
}
void loop() // run over and over again
{
Serial.print( analogRead(FlexPin)); // Reads from the Flex pin
delay(100); // wait
}
Links
In the Air [1]
National Ambient Air Quality Standards [2]
air quality standards around the world [3]
CPCB Newsletter on Public Interest Litigations
Instructables: Smelling Pollutants with an Arduino
An end to movements:Douglas Rushkoff
Arduino Tutorials
Lady Lada Tutorials [4]
Research
Resistor Color Code Table And Calculator
http://www.csgnetwork.com/resistcolcalc.html
Controlling Arduino through Processing
http://arduino.cc/en/Tutorial/PhysicalPixel
Similar Projects Elsewhere
Edge Town [5]
Environmental E-Science[6]
Urban Atmospheres[7]
Links for the Center for Science and Environment
http://www.gobartimes.org/20090715/gt_covfeature.asp
http://www.cseindia.org/campaign/apc/apc-index.htm
http://www.cseindia.org/AboutUs/press_releases/press-20090722.htm
Graph for 2007-08
http://kspcb.kar.nic.in/ambient_air_quality.htm
link for - WHO air quality standards: International WHO air quality guidelines were issued in 2005, replacing the European-focused standards published in 2000. The 2005 WHO guidelines include both ideal targets as well as interim targets for developing countries.
http://www.who.int/phe/health_topics/outdoorair_aqg/en/index.html
Build your own Air Pollution Detector
http://www.bioedonline.org/k-5/pdfs/Air_Pollution_Detector.pdf
Flea-like robots double as pollution detectors
http://www.engadget.com/2007/08/17/flea-like-robots-double-as-pollution-detectors/
Daily Pollution Statistics in Bangalore "including Yelahanka"
http://kspcb.kar.nic.in/poll_lev.asp
Serious Health Hazard Levels of Pollutants

