Digital Detection Of Black And White With IR LED And Phototransistor
February 1, 2011
I have been using a simple Black/white detection circuit with my picaxe to make a line following robot.
i wired up a circuit like the one below and programmed the Picaxe with the code below.
basicly what it did was when the IR LED/Phototransistor pair detected black it sent the number 1 to my computer and when it saw white it sent the number 0. this worked fine with the circuit wired exactly like it is below, but when i changed the Picaxe input to a different pin it just kept constantly sending 0's to my computer.
any ideas why it isn't working on other pins?
if pinc.0 is on then