|
Re: Using Analog Inputs as Digital (on the OI)
tie a 10K resistor from +5 to the analog input pin
connect a switch from ground to the same analog input pin
when the switch is closed you will have a 0
when the switch is open you will have full scale analog value (I don't remember if it is 8 or 10 bit or what)
write some code that interprets
half-scale or lower as a switch closed
else
switch open
__________________
Ed Barker
|