IIRC the standard conversion formula for bat voltage
gives you an integer value in millivolts. If you send
that as an int to your host PC you need to write a little
cast in your receiving program, something like:
        ((double) value) / 1000.0
MS


Mohamed H. Seddik wrote:
> thanks for the answer.
>  
> I know the formula but I need to display the decimal readings not the 
> integers because the serialforwarder is displaying just the integer 
> values !! even if I used the float for the variables.
> 
> Thanks  & Have a Nice Day
>  
> Mohamed
> 
> 
> --- On *Sat, 4/4/09, Michael Schippling /<[email protected]>/* wrote:
> 
> 
>     From: Michael Schippling <[email protected]>
>     Subject: Re: [Tinyos-help] Voltage Readings
>     To: "Mohamed H. Seddik" <[email protected]>
>     Cc: [email protected]
>     Date: Saturday, April 4, 2009, 4:28 PM
> 
>     The Getting Started manuals used to have the conversion formula,
>     or search this list.
>     MS
> 
>     Mohamed H. Seddik wrote:
>      > Hi
>      >  I'm using voltageC interface to read my current voltages
>      > How can I see these readings */precisely/*
>     
> <http://www.google.com/search?hl=en&ei=xsvWSbrHNpvslQepwLHkDA&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=precisely&spell=1
>     
> <http://www.google.com/search?hl=en&ei=xsvWSbrHNpvslQepwLHkDA&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=precisely&spell=1>>
>    (decimal
>     values"0.000v" - not just the integer )
>      > what I have to do ?
>      >
>      > Thanks  & Have a Nice Day
>      >  Mohamed
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Tinyos-help mailing list
>      > [email protected]
>     
> <http://us.mc329.mail.yahoo.com/mc/[email protected]>
>      >
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to