[Tinyos-help] Voltage Readings

Michael Schippling schip at santafe.edu
Sat Apr 4 14:38:18 PDT 2009


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 /<schip at santafe.edu>/* wrote:
> 
> 
>     From: Michael Schippling <schip at santafe.edu>
>     Subject: Re: [Tinyos-help] Voltage Readings
>     To: "Mohamed H. Seddik" <mhsedek at yahoo.com>
>     Cc: tinyos-help at millennium.berkeley.edu
>     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
>      > Tinyos-help at millennium.berkeley.edu
>     <http://us.mc329.mail.yahoo.com/mc/compose?to=Tinyos-help@millennium.berkeley.edu>
>      >
>     https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> 
> 


More information about the Tinyos-help mailing list