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 / 27
26  |  28
Subject: 
Re: Battery voltage available within NQC?
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Fri, 12 Mar 1999 03:32:58 GMT
Viewed: 
2674 times
  

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.

If you REALLY wanted to do this, you could use the bytecode to broadcast
the battery information to the IR tower and have a service running on the
PC which would recieve the battery message and then send an appropriate
message back to the RCX.  Pretty slopy but it should work.


Joel Shafer    joel@connect.net



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