Subject:
|
Using analog ports as digital
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Sat, 26 Apr 1997 22:17:43 GMT
|
Original-From:
|
Yoni Garbourg <ygarbour@emerald.tufts.edu!nospam!>
|
Viewed:
|
1213 times
|
| |
| |
The HB manual says that if you us the digital command on an analog port,
the result is true if analog measurement is <127, and false for
analog>127. I tried this and it does not seem to work that way. I get
true for 0<analog<255, basically digital(6) always equals true or 1.
ANy suggestions?
Sincerely,
Yoni Garbourg
<< To succeed, Atificial Intelligence needs
1.7 Einsteins, two Maxwells, five Faradays,
and .3 Manhattan Projects." >>
-John McCarthy
|
|
Message has 1 Reply: | | Re: Using analog ports as digital
|
| (...) The way it really works is that if the analog value is 255 then it returns 0 other wise it returns 1. So you can modify the lib_hb.c file and change the constant, or use the analog() call on the pin. --Chuck (27 years ago, 26-Apr-97, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|