To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.pbforthOpen lugnet.robotics.rcx.pbforth in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / pbFORTH / 24
23  |  25
Subject: 
RE: SENSOR_READ doesn't return 0
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Tue, 13 Apr 1999 02:07:31 GMT
Viewed: 
1556 times
  
I have been experimenting with the latest version of pbFORTH (102)

AhA! Another victim within my clutches!!!!! Glad to hear you are trying
things out, John. The more questions I get, the sooner I can get a FAQ
out to help with the common ones.

Which announces itself thus:

hhii


hForth H8/300 for RCX RAM Model V1.0.0 by Ralph Hempel, 1998

All noncommercial and commercial uses are granted.

Please send comments, bug reports and suggestions to:

  rhempel@bmts.com

That's a good sign, at least.

I cannot get the LIGHT? word (tracker.txt) to work, it seems never to
return 0, usually 200 or 300 (hex). I am initialising using:

1 CONSTANT RawLight
1 CONSTANT RunButton
3 CONSTANT MotorStop

You have obviously had some FORTH experience, I'll have to admit I haven't
fully tested the CONSTANT word...

: BOT_INIT

  ." BOT_INIT" CR \

  RCX_INIT
  POWER_INIT
  BUTTON_INIT
  SENSOR_INIT

    RawLight SENSOR_ACTIVE
  3 RawLight SENSOR_TYPE   ( Light )
  0 RawLight SENSOR_MODE   ( Raw )

;

What is the significance of a non-zero return by SENSOR_READ ?

This LOOKS ok, the non-zero return generally indicates BUSY, or not ready.

First off, does the script as presented work? In other words, does TRACKER.TXT
work on your RCX? If so, then I'd be looking at the CONSTANT word and making
sure it works properly too.

Please email me again if you have problems, and give me as much feedback as
you can, good or bad...

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.bmts.com/~rhempel/lego/pbFORTH/default.html>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
-------------------------------------------



Message has 3 Replies:
  Re: SENSOR_READ doesn't return 0
 
(...) I am just dabbling at the moment, trying a few words to try and get them debugged. In order to fully port the SpeedBot (currently in NQC) I'll need multitasking... (...) Oh, good - I wondered if I'd got versions mixed up somewhere. It would be (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
  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 (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)
  Re: SENSOR_READ doesn't return 0
 
..and now I have the answer, after extensive grepping around Kekoa's disassembly and the pbFORTH .ASM files. SENSOR_READ should return only the bottom byte, the call to 0x14C0 only returns a byte so the high byte contains garbage (actually it seems (...) (25 years ago, 13-Apr-99, to lugnet.robotics.rcx.pbforth)

Message is in Reply To:
  SENSOR_READ doesn't return 0
 
I have been experimenting with the latest version of pbFORTH (102) Which announces itself thus: hhii hForth H8/300 for RCX RAM Model V1.0.0 by Ralph Hempel, 1998 All noncommercial and commercial uses are granted. Please send comments, bug reports (...) (25 years ago, 12-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
    

Custom Search

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