Don't have my sketch in front of me so I know this is breaking the rules, but I've already narrowed it down to a hardware problem.
I have an IR LED set up and verified it is lighting up using a camera.
Then I have an IR Phototransistor going into analog zero.
Sudo code sets analog 0 to input, reads the value and prints it to serial but it's always at 1023 even if the LED is on or off. Even if I cover the sensor with my finger or a dark cloth it still reads 1023. Even if I unplug the IR LED and cover the sensor. Still reads 1023.
I know the code is good because I put a pot in place of the sensor and the value changed as I turned the pot.
I've also tried changing the resistor value. Everything from 150ohms to 100K. It just always reads 1023.
Here are the 2 parts...
Thanks in advance.