You will need to create two DemoSensor type files that differ
only in their ADC channels. Or for extra credit you can just
eliminate the entire DemoSensor thing and just use ADC[x] & ADC[y],
where x and y are the channel numbers of interest.

Generally you could use a Timer to fire off the first ADC.getData()
conversion and then in the dataReady() of that ADC, fire the next one.
There is some indication that you could do both getData()'s in the
timer fire routine -- and internal ADC queuing code will handle the
sequencing -- but I haven't actually tried it...

seem reasonable?
MS


Fangming Zhang wrote:
Hi everyone,

I use a MTS310 to read the accelometer data, X and Y. The wireless platform is micaz. My difficulty is how to implement measure and put the X and Y acceleration in one 'DemoSensorC' file. It seems the interface 'Read' can only read one AD port. How can I do?

Regards,
Fangming


------------------------------------------------------------------------

_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to