Subject:
|
RE: SENSOR_READ doesn't return 0
|
Newsgroups:
|
lugnet.robotics.rcx.pbforth
|
Date:
|
Thu, 15 Apr 1999 17:21:23 GMT
|
Viewed:
|
1781 times
|
| |
| |
> How does 80 in TRACKER.TXT square with the documentation?
>
> "SENSOR_MODE ( mode idx -- )
>
> Sets the specified sensor to one of the following modes. Use your common sense when
> combining different modes and types...
>
> 0x0000 Raw mode
> 0x2000 Boolean mode
> 0x4000 Edge detection - every transition counts
> 0x6000 Pulse detection - only negative transitions count
> 0x8000 Percent of scale
> 0xA000 Degrees Celsius
> 0xC000 Degrees Fahrenheit
> 0xE000 Angle detection"
OOPS, that SHOULD read 0x0080 since the mode is a BYTE value. Overzealous urge to get
content into the website is to blame.
For the light sensor, I generally use the percent of scale mode. My website
has a page on tricks with the light sensor that lets you get useful
measurements this way.
Please keep the cpmments coming. As far as multitasking goes, hFORTH (which pbFORTH)
is based on DOES have some primitive tasking available. If necessary, I'll try to integrate
it soon, along with the version change and other suggestions...
Cheers,
Ralph Hempel - P.Eng
------------------------------------------------------
Outside of a dog, a book is a man's best friend.
Indside of a dog, it's too dark to read...
------------------------------------------------------
Reply to: rhempel at bmts dot com
------------------------------------------------------
|
|
Message has 1 Reply: | | Re: SENSOR_READ doesn't return 0
|
| (...) Well, I think your progress so far is very good, I can understand the odd slip-up, it keeps us on our toes. If I get anywhere with the LCD constants for the complicated segments I'll let you know. (...) Because I am trying to reproduce (...) (26 years ago, 16-Apr-99, to lugnet.robotics.rcx.pbforth)
|
Message is in Reply To:
| | Re: SENSOR_READ doesn't return 0
|
| More information: (...) CONSTANT is working - easy to check by doing RawLight . which prints 1 (...) This last line is the problem, if I use a SENSOR_MODE of 80 as in TRACKER.TXT then I get a SENSOR_READ of 0, if I use SENSOR_MODE 0 then I never get (...) (26 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
|
10 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|