------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Contiki-developers mailing list
Contiki-d...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/contiki-developers
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
Actually, there is.
“lib/sensors.h” and “dev/battery-sensor.h” define the API for the battery sensor. The implementation depends on the platform of course – you’ll find it in “platform/(platform name)/dev/battery-sensor.c” if it exists.
Basically, you activate the battery sensor with battery_sensor.activate() and you can get its value with battery_sensor.value(0). You will probably need to rescale the result of that operation to a desired magnitude though.
Joris
You may not need the averaging, but his code is pretty close to the simplest way to read battery voltage. You could also leave the "sensor" activated, instead of deactivating it at each get_voltage().
Van: Borms Joris [mailto:jbo...@etro.vub.ac.be]
Verzonden: Thursday, April 15, 2010 1:45 PM
Aan: Contiki developer mailing list
Onderwerp: Re: [Contiki-developers] battery voltage
Actually, there is.
"lib/sensors.h" and "dev/battery-sensor.h" define the API for the battery sensor. The implementation depends on the platform of course - you'll find it in "platform/(platform name)/dev/battery-sensor.c" if it exists.
Joris
Hope it helps.
________________________________________
Télécharger en toute sécurité sur Internet ? La solution avec Internet Explorer 8
________________________________________
Best Regards,
Carlo Alberto Boano
Borms Joris ha scritto:
________________________________________
Acheter en ligne en toute sécurité ? Internet Explorer 8 vous protège gratuitement !
------------------------------------------------------------------------------
Best Regards,
Carlo Alberto Boano
Borms Joris ha scritto: