Hello
I am completely new to the arduino and im having trouble understanding a lot of things.
Im not very good with electronics as a whole so was looking for some pointers with something im trying to do.
I want to set up and IR beam that is on constantly and when the beam is broken, that triggers something in Pure Data.
Could someone tell me how to go about setting this up from the start. I've tried reading tutorials etc but im still lost.
Stick an IR Led on an digital pin with a current limiting resistor and turn it on
Stick a phototransistor on a digital pin and monitor it, it will need a pull up and should be low when the IR beam is on it. [edit]Eh, don't need a digital pin, just +5 volts for the IR led. You do need one for the phototransistor[/edit]
When the photo transistor pin goes high that's your beam break
Since you want a beam break you don't need the IR LEDs on the digital pins. They can go to +5v.
They don't show it but the text tells it that +5 goes to pin 2 and the 10k resistor then the other side of the resistor goes to the photo transistor. The resistor is pulling up pin2 and the photo transistor grounds it. You'll be looking for the digital pin to go low.
Thanks
Ill see if I can get my head round that.
What resistor would i use and where would i put it. My knowledge of electronics is very limited!
Also, how would I declare a phottransistor in the Arduino environment software?