Hi,
I'm attempting to make a model railway signalling system, which in part has been copied from a tutorial on YouTube. I have the setup of the wiring etc correct but am struggling with a certain aspect of the program. The circuit features an Infrared transmitter & receiver and when this is triggered the voltage from Pin1 of a 18M2 chip dropped to around 0.4v. How do I program the chip to detect that this pin has dropped low? Currently when the sensor triggers it simply turns out the green signal then turns it back on once the sensor isn't receiving. The idea is that when the sensor is tripped it starts a sequence turning the red signal on then yellow etc. I'm just confused how I get the program to recognise and start this sequence.
I'm attempting to make a model railway signalling system, which in part has been copied from a tutorial on YouTube. I have the setup of the wiring etc correct but am struggling with a certain aspect of the program. The circuit features an Infrared transmitter & receiver and when this is triggered the voltage from Pin1 of a 18M2 chip dropped to around 0.4v. How do I program the chip to detect that this pin has dropped low? Currently when the sensor triggers it simply turns out the green signal then turns it back on once the sensor isn't receiving. The idea is that when the sensor is tripped it starts a sequence turning the red signal on then yellow etc. I'm just confused how I get the program to recognise and start this sequence.