risknfun's blog    |  go to risknfun's homepage
Blog Main
Tag | Guestbook | Admin   
 
IR sensor test
I tested IR sensors for Physical Computer project. I used Infrared LED(Radioshack 276-143), Infrared Phototransistor(Radioshack 276-145). For basic circuit, I saw this reference.





It works fine!

#define detectorPin0 0
#define detectorPin1 1
#define detectorPin2 2

int detectorValue0 = 0;
int detectorValue1 = 0;
int detectorValue2 = 0;

void setup() {
Serial.begin(9600);
}

void loop() {
detectorValue0 = analogRead(detectorPin0) / 4;
detectorValue1 = analogRead(detectorPin1) / 4;
detectorValue2 = analogRead(detectorPin2) / 4;
Serial.print(255-detectorValue0);
Serial.print("\t");
Serial.print(255-detectorValue1);
Serial.print("\t");
Serial.print(255-detectorValue2);
Serial.print("\t");
Serial.println();
delay(5);
}
Tag : ,
Track this back : http://itp.nyu.edu/~yc581/blog/trackback/20
Commented by Gian Pablo at 2006/10/20 05:41  r x
The IR sensors are very sensitive to physical configuration! In order to get a good reading, the emitter and sensor have to be quite close, and slightly pointed towards each other. This is because the emitter transmits a very narrow beam, and the sensor only sees a narrow field of view.

name    password    homepage
 hidden


 Category
All (251)
Project (1)
Me, Myself & I (52)
ITP (106)
NY (92)
 TAGS
"+ and -" 3D AIA Albeniz Alisa Weilerstein American Museum of Natural History Anish Kapoor Anne Ducros Anne-Sophie Mutter Application architecture Arduino Armory Show art Assistive Technology bar Beethoven bibimbab biofeedback Birdcalls Birdland bitforms BK Blog Blue Note Brahms Brown C cafe Calder Camera4K Carnegie Hall Center for Architecture Chelsea Chris Marker Cleveland Orchestra clock collage CommLab compform composition Computaional Form Computational Forms Computers for the Rest of You consciousness Daniel Barenboim Dave Holland design Designing for Constraints DfC Dia:Beacon Distortion DJ dogs Donald Judd drive dynavox EEG Elizabeth Seton email Experimental Video First Friday football fountain2006 Gagosian Gallery game Garrick Ohlsson Gehry Gershwin Gidon Kremer gmail Graphical Novel Grey Art Gallery Guggenheim Hair Halloween Harlem horse hot dog IAC Iannis Xenakis IDEO IFC center Illusion Wheels Interactive Puppet Theater IPAC2 IR sensor ITP jazz John Cage Kwang-Young Chun La Jetée Lamp Lang Lang Leeds Radio Leon Fleisher Lev Manovich Lilya Zilberstein Lincoln Center Louise Lawler Marc-André Hamelin Matthew Barney Maurizio Cattelan Maxim Vengerov Maya metaforms Michel Gondry Minsoo Lee MLB MoMA Mona Hatoum Morse code movie Moving Pictures Mozart Nam June Paik Neuroesthetics Nevada Smiths NY life Olafur Eliasson On Kawara OUT OF TIME paper prototype party photoshop Physical Computing piano
 Recent Entries
Moving
inspiration, perspiration..
lights in the dark
Life (2)
Dali
 Recent Comments
thank you man. hope you h..
risknfun - 2008
happy thanksgiving~
cheter - 2008
Some of the pictures have..
Chromaniac - 2008
저거 어디더라.. MET museu..
kaka - 2008
http://www.artnet.com/mag..
nori - 2008
 Archive
2009/01
2008/12
2008/11
2008/07
2008/06
 Visitor Statistics
Total : 86018
Today : 4
Yesterday : 7
rss