I have a Phototransistor that, when given IR light outputs about 0.10V..
I assume it would be easy to read it with analog input and some threshold logic, but, i would rather have it output high or low..
So my question is, can I make the phototransistor have a base 3.95V or so, so when the IR hits it the voltage goes 4.05V (and HIGH on input)?
I have wired a ~250k resistor to the phototransistor and while being it with IR its voltage is around 2.36V
When i block the ir emitting diode, it goes up to 3.65, however, the Arduino digitalread() says that 2.36V is High.. i thought only values over 3 counted as high?
Simply use the analogue input and compare what you read with a threshold value. If it is above the threshold then do one thing if it is below then do another. There is no need to condition the signal into a digital one.
i thought only values over 3 counted as high
Over 3V is is guaranteed to read as high under 1V it is guaranteed to read low. Anything in between is not guaranteed to read any level but as it is a digital input it will always return either high or low. Normally it continues to return the last true value it read.