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