To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 26
25  |  27
Subject: 
Re: Battery voltage available within NQC?
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 12 Mar 1999 03:23:01 GMT
Viewed: 
2354 times
  
In article <F8GEGC.H3K@lugnet.com>, "Murray Altheim"
<altheim@[remove-me]eng.sun.com> wrote:

Last night I went out and bought six C cell nicads and wired them up
as a power supply for my robot. What I'm wondering is this: is there
some way to programmatically obtain the battery voltage, so I could
make a decision based on a voltage threshold? Like changing the robot
behaviour to begin searching for a charging outlet? I'd also like
to be able to then unhook from the charger when the voltage reached
an upper threshold.

I know that the firmware seems to know about battery voltage, and
returns the value sometimes when communicating with nqc. It's also
available within the Mindstorms software. What would be the NQC code
to obtain that value?


There's a bytecode (0x30) that instructs the RCX to send the battery
voltage as a response over the IR.  That's what NQC and Mindstorms use to
read the battery voltage.  I don't think this opcode has any effect within
a program, or at best it would trigger the RCX to broadcast its battery
voltage.  I'm not aware of any way to read the battery voltage into a
variable from within the RCX.

Dave

--
reply to: dbaum at enteract dot com



Message is in Reply To:
  Battery voltage available within NQC?
 
Last night I went out and bought six C cell nicads and wired them up as a power supply for my robot. What I'm wondering is this: is there some way to programmatically obtain the battery voltage, so I could make a decision based on a voltage (...) (26 years ago, 11-Mar-99, to lugnet.robotics.rcx.nqc)

3 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