Physical Computing | The Poetics of Virtual Spaces
 
Week 1 --> Basic Electronics
Week 2/3 --> BasicX, BX24 Programming
Week 4 --> Memory & Variables
Week 5 --> Analog Input
Week 6 --> Transistors & Relays & A Tech Research About TTC (Motion/Color Capture)
Week 7 --> Analog Output
Week 8 --> Midterm Project - The LED 5x7 Matrix Quest
Week 9 --> Serial Communication
Week 10 --> Serial To Director

At this point I feel I am a little behind. It is a bit stressful but OK, considering this is the first time I am dealing with such concepts...
Well, it gets boring to get only either 0 or 5v from my BX-24 pins, hence I am learning that it is possible to convert digital output to analog (ADC). By doing that, I am able to change the voltage gradually, like light or music, etc.
The formula for this will be:
X = getADC(pin#)
X is the integer and will give a number between 0 and 1024, which is a 10 bit number.
I obviously would like to communicate electronically with the people who are interacting with my model. For that I need to balance my input and output, and by that control better the pulses of the LED that is now a better listener to the user. To execute such action Tom provided us with a For - Exit statement example. This type of statement can be used to execute a loop a specific number of times. To make our lives harder, Tom had modified the example so it won't function. Thru a small research made me realize that a For - Exit loop has to have local variables. They can't be global!

OK, I am excited now. I have managed to light a series of LED's with ...ta da da da da the potentiometer AKA pot. So this is pretty easy, I just assigned each LED with a certain < or > value from 0 to 1024 (the ADC 10 bit number) and as I turn the pot's knob the value change affects the LED in order. Cool!

I am sick of LED's picture so here's the real stuff:

  

This may be the last time I am putting a code on this site. It is quite annoying to code this code (hmmmmm) with HTML. So I might include parts of codes to help these future minds...


�2005 Limor (Garcia) Hader | limilim (at) gmail