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 / 70
69  |  71
Subject: 
FW: New pbFORTH
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Tue, 11 May 1999 16:36:52 GMT
Viewed: 
1706 times
  
-----Original Message-----
From: Ralph Hempel [mailto:rhempel@bmts.com]
Sent: Wednesday, May 05, 1999 7:37 AM
To: robots@jpsc.co.uk
Subject: RE: New pbFORTH


I've figured out how POWER_GET works, but not the return values. From the
docs it takes one argument, but the code says two ( addr-a code -- )

HEX RCX_POWER 4000 POWER_GET RCX_POWER @ DECIMAL .

seems to return 2 if the button isn't pressed, and 0 if it is.

That is correct if you look at Kekoas description on his internals page,
although he says the return value is one for not pressed,

Do you know the mapping of the raw battery voltage values? I seem to get
280 (decimal) for NiCds

Again, see Kekoa's page...the reference is on my home page.


I think it would be batter to have two calls
get_on_off_key_state ( -- state )
get_battery_voltage ( -- millivolts )
and do whatever needs to be done to return a flag for the first and true
voltage for the second.

You are probably right here. I did what I did so you could query once and
then just look at the variable. It's easy to hide the RCX_POWER function in
your prototypes.


POWER_OFF doesn't seem to work for me. I've tried:

RCX_INIT
POWER_INIT
BUTTON_INIT
SENSOR_INIT

then:

POWER_OFF

just causes the RCX to die and the ON/OFF button doesn't get it back.

Yes, there IS still a bug, I'll dig it up shortly.

I've tried HAT and BUILD and SLEEP, etc and so far it seems to work.

Neat, huh? But what on earth does HAT mean? Something A Task ?

Have you tried MARKER, it is a really useful word.

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
------------------------------------------------------



1 Message 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