Hi Michael,
i have two motes, one got a raw battery value 140, another is 148. But
these two values didn't look like a real voltage value. i wanna know how
to convert these to real value like 3v or 3000. Perhaps I got the wrong
value from my program.
Thank you
Leo
> I'm going to assume that the values you get are between 140 and 148
> rather than being 148 thousand and change...
>
> In which case, look in the Getting Started Manuals or search this
> list for a conversion formula. There's probably even a FAQ on
> docs.tinyos.net
>
> MS
>
>
> SHEN Zhong wrote:
>> Hi, everyone
>>
>> I want to get the battery of micaz mote. I use the component Voltage.
>> The
>> following code is about getting battery.
>>
>> In configuration, i used following code:
>>
>> MYAPP.VoltageControl -> Voltage;
>> MAAPP.ADCBATT -> Voltage;
>>
>> In module,
>>
>> interface StdControl as VoltageControl;
>> interface ADC as ADCBATT;
>>
>> async event result_t ADCBATT.dataReady(uint16_t data)
>> {
>> atomic{
>> battery = data;
>> }
>> return SUCCESS;
>> }
>>
>> After i got the battery value, the program send packet to base. I found
>> the raw data about battery is nearly 140,148. It looks strange.
>>
>> How could i convert the raw data to real battery voltage? micaz
>>
>> Thank you very much.
>>
>> Regards
>>
>> Leo
>>
>> _______________________________________________
>> Tinyos-help mailing list
>> [email protected]
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
> --
> Platform: WinXP/Cygwin
> TinyOS version: 1.x, Boomerang
> Programmer: MIB510
> Device(s): Mica2, MicaZ, Tmote
> Sensor board: homebrew
>
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help