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 / 50
49  |  51
Subject: 
FW: New pbFORTH
Newsgroups: 
lugnet.robotics.rcx.pbforth
Date: 
Tue, 11 May 1999 16:36:11 GMT
Viewed: 
1554 times
  
-----Original Message-----
From: John Cooper [mailto:robots@jpsc.co.uk]
Sent: Wednesday, May 05, 1999 5:08 AM
To: Ralph Hempel
Subject: Re: New pbFORTH


I have it now, thank you.

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.

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

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.


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.


I've tried HAT and BUILD and SLEEP, etc and so far it seems to work.
--
John Cooper, Wallington, UK



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