Archive forSeptember, 2007
3rd Lab - B
- the video of fading the leds -
This is the third step of practcing analog I/O. Analog has the duty cycle between 0 to 255(pwm). By using this cycle, for statements, and delay time, I can make the fading line leds from middle to outer led.
Fading five leds Using of analog output (pwm) one after the other
int pinOut11 = 11; // set pinOut11 to pin number 11
int pinOut10 = 10; //set pinOut10 to pin number 10
int pinOut9 = 9; //set pinOut9 to pin number 9
int val = 0; // variable to keep potetiameter value
int analIn = 0; // set analogIn to analog pin number 0
int fadeVal = 0; // variable to keep the pwm value
void setup(){
Serial.begin(9600);
pinMode(pinOut9,OUTPUT); // declare the pinOut9 as an OPUT
pinMode(pinOut10,OUTPUT); // declare the pinOut10 as an output
pinMode(pinOut11,OUTPUT); // declare the pinOut11 as an output
}
void loop(){
// val = analogRead(analIn); read the value from the potentiameter
Serial.println(val,DEC);
for(val =0 ; val<=255 ; val +=5){ // fade in (from min to max)
analogWrite(pinOut11,val);
delay(10); // wait 30mili seconds to see the dimmer
}
for(val = 255 ; val >=0; val -=5){
analogWrite(pinOut11, val);
delay (10);
}
for(val =0 ; val<=255 ; val +=5){
analogWrite(pinOut11,val);
analogWrite(pinOut10,val);
delay(10);
}
for(val = 255 ; val >=0; val -=5){
analogWrite(pinOut10, val);
analogWrite(pinOut11, val);
delay (10);
}
for(val =0 ; val<=255 ; val +=5){
analogWrite(pinOut11,val);
analogWrite(pinOut10,val);
analogWrite(pinOut9,val);
delay(10);
}
for(val = 255 ; val >=0; val -=5){
analogWrite(pinOut10, val);
analogWrite(pinOut11, val);
analogWrite(pinOut9, val);
delay (10);
}
}
2nd LAB
- the video of making the LOOP-
int timer = 100;
int pins[] = {2,3,4,5,6,7};
int num_pins = 6;
void setup(){
int i;
for(i=0; i< num_pins ; i++)
pinMode(pins[i], OUTPUT);
}
void loop(){
int i;
for(i=0 ; i< num_pins ; i++){
digitalWrite(pins[i], HIGH);
delay(timer);
digitalWrite(pins[i], LOW);
}
for(i = num_pins -1 ; i>=0; i–){
digitalWrite(i, HIGH);
delay(timer);
digitalWrite(i, LOW);
}
}
In this case, I make the 13 pin as an output. Depending on delay time, led blinks by repeating High voltage(5V) and Low voltage(0V)
Digital I/O
digitalRead(pin) -> reads the value from the pin I want to read, it will be either HIGH or LOW.
digitalWrite(pin, value) -> outputs either HIGH orLOW at the pin what i want to write
// declare variables:
int switchPin = 2; // digital input pin for a switch
int yellowLedPin = 3; // digital output pin for an LED
int redLedPin = 4; // digital output pin for an LED
int switchState = 0; // the state of the switch
void setup() {
pinMode(switchPin, INPUT); // set the switch pin to be an input
pinMode(yellowLedPin, OUTPUT); // set the yellow LED pin to be an output
pinMode(redLedPin, OUTPUT); // set the red LED pin to be an output
}
void loop() {
// read the switch input:
switchState = digitalRead(switchPin);
if (switchState == 1) {
// if the switch is closed:
digitalWrite(yellowLedPin, HIGH); // turn on the yellow LED
digitalWrite(redLedPin, LOW); // turn off the red LED
}
else {
// if the switch is open:
digitalWrite(yellowLedPin, LOW); // turn off the yellow LED
digitalWrite(redLedPin, HIGH); // turn on the red LED
}
}
Observation Assignment
The observation of using everyday technology seems to be tough for me because even though I always observe person’s behavior and what they are doing, I had to be invloved in people’s private spaces by looking at them closely instead of glancing at them. Here is my observation.
On the subway, there was a young man who had a moblie phone. He was sitting alone and took the phone from his pocket, opened the folder, pushed the menu button, and chose the music. The music made a loud sound. At first, I thought he just wanted to listen to the electronical music. however, while listening to the music, he was rapping the side of the phone to make a sound like beat box. He was trying to be a DJ.
A few seconds later, he was trying to listen to the music actively, but he seemed to become bored quickly. At this point, I think there was a problem of interaction between him and his device in that the mobile phone is a device for calling and a substitute for a real beat box. that is, it is the only way to enjoy being a DJ with mobile phone for him is just rapping on this small side button. I saw several times he nearly dropped his phone while playing as well. This means the phone limits his behavior and space to enjoy his music. Finally, he just listened to the music rather than used play function of the phone.
Orality and literacy
Since Modernism starts, western culture believe that the linguistic language is the most powerful device in the way of talking ,especially, about truth. However, collapsing the theory of the Modernism and Post Modernism, they focused on minority and small stories and another way of expression. I think this could be connected well with the concept of the book ‘Orality and literacy’. To me, the book is a kind of introduction to western culture begun with written language itself that there is another way of communication, using oral language. It’s like high tech modern cultures just got opened to another world. However, Ong (western culture) still seized own or main way of expression to the world, “Writing”, because way of expression is still based on the literal language. I don’t know. Maybe, because history was always goes to extremely, Orality of language is now its turn. Maybe, because after the invention of media, stimulated senses need a explanation as an language. Whether orality of language needs another quality like depth of literal language on this high tech society is still open to answer. how? what is the depth? I am confusing.
Anyhow, a computer and all kind of medias are still going to expand human sense more and more. This is what I surly know right now.
