To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.javaOpen lugnet.robotics.rcx.java in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / Java / 331
330  |  332
Subject: 
Re: Voltage>10V????
Newsgroups: 
lugnet.robotics.rcx.java
Date: 
Wed, 10 Mar 2004 08:17:13 GMT
Viewed: 
6432 times
  
Hi,

I think it is better to continue the discussion here
so everybody can profit.

sole musitu martinez wrote:
--- Juergen Stuber <stuber@loria.fr> escribió:
"sole" <solemusitu@yahoo.es> writes:

I'm using the method 'getVoltageMilliVolt()' in my
robot. But i don't understand the value that i get, more
than 10000 mV, why? if 9600mV is the total voltage that
batteries provide.

maybe your RCX is broken?
What value do you get, >28000?

i get the voltage value before (v0) and after (v1) the
executing of a program. Then i subtract this values
v=(v0-v1) and most of the times the LCD shows the
number 9999 (v). So neither v is over 10000 or is a
negative value.

The difference is probably negative, often the voltage
increases after batteries get a little exercise, maybe
because they get warmer.  Can you try to display it signed
by using setNumber & refresh?

Here is a small example program I just wrote:

import josx.platform.rcx.*;

public class BatteryVoltage
{
    public static void main (String[] arg)
throws java.lang.InterruptedException
    {
while (!Button.RUN.isPressed()) {
    int mv = Battery.getVoltageMilliVolt();

    LCD.setNumber (LCDConstants.LCD_SIGNED,
   (mv+5)/10,
   LCDConstants.LCD_DECIMAL_2);
    LCD.refresh();
    Thread.sleep(200);
}
while (Button.RUN.isPressed()) {
}
    }
}


Jürgen

--
Jürgen Stuber <stuber@loria.fr>
http://www.loria.fr/~stuber/



Message is in Reply To:
  Re: Voltage>10V????
 
Hi, (...) maybe your RCX is broken? What value do you get, >28000? Jürgen (21 years ago, 9-Mar-04, to lugnet.robotics.rcx.java)

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