To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 2048
2047  |  2049
Subject: 
Re: Using analog ports as digital
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Sat, 26 Apr 1997 22:24:54 GMT
Original-From: 
Chuck McManis <cmcmanis@*AntiSpam*netcom.com>
Reply-To: 
cmcmanis@netcom/nospam/.com
Viewed: 
1193 times
  
Yoni Garbourg wrote:

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

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

--
--Chuck McManis       http://www.professionals.com/~cmcmanis/index.html
All opinions in this message are those of the author. No warranty as to
the suitability or accuracy is stated or implied. Use at your own risk.
cmcmanis@netcom.com                                     +1.408.524.4805



Message is in Reply To:
  Using analog ports as digital
 
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 (...) (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
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR