I really like GCBASIC, it is very easy for my to grasp-- I must congratulate you on that!
I want to spice up my bedroom, when I walk in through the door I want some LEDs to turn on in a pattern and then turn off.
I am thinking of setting up some kind of transmitter / reliever with an IR phototransistor and an IR LED. Basically, I want to detect if the beam is broken-- and if so then start flashing the LEDs.
I am not really sure how to detect this. I am thinking of using the 16F628A or the 16F819.
Any help would be appreciated,
Omar
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Basically you need to feed the voltage from the photo detector to an input port on the PIC. So the PIC port needs to be defined as an input. The bigger issue is probably how to right the hardware on the photo detector. You need 2 states one with an output close to 0 and one close to 5 volts. That suggests that the power supply can/should be the same as the PIC. Detectors often need some amplification to switch all the way from 0 to 5 volts ( and which corresponds to blocked and not blocked will depend on the circuit you use ) Google <photo detector circuits> and <photodetector circuits> for some options.
Russ
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello!
I really like GCBASIC, it is very easy for my to grasp-- I must congratulate you on that!
I want to spice up my bedroom, when I walk in through the door I want some LEDs to turn on in a pattern and then turn off.
I am thinking of setting up some kind of transmitter / reliever with an IR phototransistor and an IR LED. Basically, I want to detect if the beam is broken-- and if so then start flashing the LEDs.
I am not really sure how to detect this. I am thinking of using the 16F628A or the 16F819.
Any help would be appreciated,
Omar
Basically you need to feed the voltage from the photo detector to an input port on the PIC. So the PIC port needs to be defined as an input. The bigger issue is probably how to right the hardware on the photo detector. You need 2 states one with an output close to 0 and one close to 5 volts. That suggests that the power supply can/should be the same as the PIC. Detectors often need some amplification to switch all the way from 0 to 5 volts ( and which corresponds to blocked and not blocked will depend on the circuit you use ) Google <photo detector circuits> and <photodetector circuits> for some options.
Russ