|
Main Links:
Final Projects
|
Main /
GroupBreadmachine\\ \\ Influence: "Making Globalization Work" by Joseph E. Stiglitz about the book by "penguin" .... Here he puts forward radical new ways of dealing with the crippling indebtedness of developing countries, a new system of global reserves to overcome international financial instability, and an economically incentivised framework for dealing with energy pollutions which create global warming and which threaten us on a planetary scale. He argues convincingly for the reform of global institutions such as the UN, the IMF and the World Bank to make them truly capable of responding to the problems of our age and shows why treating developing countries more fairly is not only morally right, but because it increases global public goods, is ultimately to the advantage of the developed world too. Above all, Stiglitz argues we need to change the way we think. Now more than ever before, globalization is bringing the countries and the peoples of the world into one interdependent community, bringing with it a need to think and act globally. CODE FOR PROCESSING (parsing numbers from tokyo stock market): import processing.serial.*; Serial myPort; float previousvalue=0; String grabbedText; PFont myFont; int a; void setup(){ size(400, 100);
myFont = loadFont("AlBayan-48.vlw");
textFont(myFont, 18);
color (0);
a = (170);
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Keyspan adaptor, so I open Serial.list()[0].
// Open whatever port is the one you're using.
myPort = new Serial(this, Serial.list()[0], 9600);
// Send a capital A out the serial port
//myPort.write(65);
} void draw(){ String proxyURL = "http://itp.nyu.edu/icm/proxy/proxy.php?url="; String myURL = "http://www.tse.or.jp/english/index.shtml"; String[] arrayOfLines = loadStrings(proxyURL + myURL); String oneLongString = join(arrayOfLines, ""); //After some snooping around, we've determined that the text that we are looking for starts somewhere //below this id="topStoryContinuedB" String startMarker = " <table width=\"205\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"; int startMarkerIndex = oneLongString.indexOf(startMarker); //now search for the real information starting from the Index we just found String imgUrlStartMarker = "<tr><td align=\"center\"><font>"; //to denote a " inside a quoted string use \" !!! int startIndex = oneLongString.indexOf(imgUrlStartMarker, startMarkerIndex ); //startIndex = startIndex + imgUrlStartMarker.length(); //point to the spot right after IMG src=" //now look for the end of the image url, start looking from startIndex int endIndex = oneLongString.indexOf( "\"", startIndex); //String imageURL = oneLongString.substring(startIndex, endIndex); //grabbedImage = loadImage(imageURL); //now grab the caption for the picture. String imgCaptionStartText = "<td align=\"center\"><font>"; String imgCaptionMarker = "<td align=\"center\"><font>"; startIndex = oneLongString.indexOf(imgCaptionMarker, startMarkerIndex ); startIndex = startIndex + imgCaptionMarker.length(); //end = oneLongString.indexOf( "<", start); endIndex = oneLongString.indexOf( "&", startIndex); grabbedText = oneLongString.substring(startIndex, endIndex); background(255); //image(grabbedImage, 100, 100); fill(0); text(grabbedText, 60, 60); println(grabbedText); float grabbedTextVal = float(grabbedText); float currentvalue = (grabbedTextVal); //currentvalue = (grabbedTextVal); // prevvalue = (currentvalue); // float currentval = float (grabbedText); // prevvalue = currentvalue // currentval = grabbedText; if (currentvalue < previousvalue){ println("A"); myPort.write('A'); } if (currentvalue > previousvalue){ println("B"); myPort.write('B'); } if (currentvalue == previousvalue){ println("C"); myPort.write('C'); } previousvalue = currentvalue; delay(5000); } /////////////////////////////////////////////////////////////////////////////////////////////////////// CODE FOR ARDUINO: int switchPin = 2; // switch input int motor1Pin = 3; // H-bridge leg 1 int motor2Pin = 4; // H-bridge leg 2 int speedPin = 9; // H-bridge enable pin int ledPin = 13; //LED int val = 0; void setup() { Serial.begin(9600); // set the switch as an input: pinMode(switchPin, INPUT); // set all the other pins you're using as outputs: pinMode(motor1Pin, OUTPUT); pinMode(motor2Pin, OUTPUT); pinMode(speedPin, OUTPUT); pinMode(ledPin, OUTPUT); // set speedPin high so that motor can turn on: digitalWrite(speedPin, HIGH); // blink the LED 3 times. This should happen only once. // if you see the LED blink three times, it means that the module // reset itself,. probably because the motor caused a brownout // or a short. blink(ledPin, 3, 100); } void loop() { val = Serial.read();
/*
// if the switch is high, motor will turn on one direction:
if (digitalRead(switchPin) == HIGH) {
digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high
}
// if the switch is low, motor will turn in the other direction:
else {
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge high
digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge low
}*/
// if the switch is high, motor will turn on one direction:
if (val == 'A') {
digitalWrite(motor1Pin, LOW); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge high
delay(1000);
}
// if the switch is low, motor will turn in the other direction:
if (val=='B'){
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge high
digitalWrite(motor2Pin, LOW); // set leg 2 of the H-bridge low
delay(1000);
}
if (val=='C'){
digitalWrite(motor1Pin, HIGH); // set leg 1 of the H-bridge low
digitalWrite(motor2Pin, HIGH); // set leg 2 of the H-bridge low
delay(1000);
}
} /* blinks an LED */ void blink(int whatPin, int howManyTimes, int milliSecs) { int i = 0;
for ( i = 0; i < howManyTimes; i++) {
digitalWrite(whatPin, HIGH);
delay(milliSecs/2);
digitalWrite(whatPin, LOW);
delay(milliSecs/2);
}
} ////////////////////////////////////////////////////////////////////////////////////////////////// \\ Two motors will carry a "meat grinder" which produces dough in this case, over a hot surface. The two motors will move the grinder in the x and y direction. The dough will therefore be distributed on the hot surface in the shape of a stock market graphic. The statistical bread will bake on the hot surface and will be eatable. The connection to the numbers from stockmarket can be done with processing in real time. 28/11/06 I finally have all the parts I need. Took some time until I received my precious motors and gears and all. Now I will fix it all together. I have to do the software part as soon as I'm done with that. On the website http://derstandard.at/ the change of the index is shown every hour. ................................................................................................................................................................................................................................................................................ M A T E R I A L S:
M c M a s t e r c a r r :
|