[Tinyos-help] Control the timing of the ADC measurement
Agnelo Silva
agnelors at gmail.com
Fri Feb 13 08:33:09 PST 2009
I am developing a driver for a sensor (MICA2, MDA-100, and
XUbuntu/TinyOS2.x) and I am using the sample code from TestSerial and a
"call Read.read();" as the base for this development.
By default, the behavior of the software is exactly as expected: every 100ms
it gets the environment's light measurement and send it to the serial port.
So, I modified the code to power-up PW4 and read ADC4, where I installed my
sensor.
I am getting the correct readings but there is something that I didn't
understand: taking an oscilloscope (a real one), I verified that PW4 is "on"
for 10ms, with a period of exactly 100ms. I modified the timeout for 200ms
and the period is exactly 200ms with a PW4_ON=10ms again.
I would like to know how can I control this time for activating (10ms) and
deactivating PW4. My sensor needs a specific time "ON" before taking the
measurement. Also, I also need a specific time "ON" after taking the
readings.
Regards,
Agnelo Rocha da Silva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20090213/4853a2e3/attachment.htm
More information about the Tinyos-help
mailing list