The VoltageM module is basically a layer over ADC and is used
in an analogous manner. See the Oscilloscope demo app for how
ADC is used; even though it is obfuscated by two layers of
DemoSensor you should be able to swap in VoltageM instead.
(full disclosure: I haven't tried it...)
Basically:
    VoltageM.start()
    VoltageM.getData()
    wait for VoltageM.dataReady() to fire
    VoltageM.stop()

you only need to do start() and stop() once if you are not concerned
about power usage.

That said, I'm not sure that VoltageM works correctly for micaz
in all versions of T1. Try searching on this list for more tidbits.

MS

Firas Daghmash wrote:
Hi All,

I need a help on using the VoltageM to measure Micaz voltage, What is
needed to connect this component to the application and what is the
function to call to get the data?

_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to