Subject:
|
Battery voltage available within NQC?
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Thu, 11 Mar 1999 23:26:36 GMT
|
Viewed:
|
2281 times
|
| |
| |
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?
Thanks,
Murray
|
|
Message has 2 Replies: | | Re: Battery voltage available within NQC?
|
| (...) 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 (...) (26 years ago, 12-Mar-99, to lugnet.robotics.rcx.nqc)
| | | Re: Battery voltage available within NQC?
|
| (...) 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. (...) (26 years ago, 12-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
|
|
|
|