I believe the MTS310 light and temp sensors use the same ADC channel
and are enabled by toggling one (or two...) DIO lines. What this means
is that you need to start and stop each of the sensors (in T1 at least)
in between readings. Look through the T2 PhotoC and TempC code to see
how they deal with it.

MS


Roberto Fernández Martínez wrote:
I cannot read data from MTS310. I would like to read temperature and light at the same time. I do all in Tinyos-2.x.

components new PhotoC();

components new TempC();

App.ReadP -> PhotoC; // Photo sensor

App.ReadT -> TempC; // Termistor

uses interface Read<uint16_t> as ReadP;

uses interface Read<uint16_t> as ReadT;

call ReadV.read()

call ReadT.read()

I do this but my answer is that I can read the photo sensor but I can’t read de temperature.

I have values as these:

Light: 03 4F, 0350,….

Temp: always 00 00.

If somebody can help me, I would be tanked for it.

Thank you.
Roberto.


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

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

--
Platform: WinXP/Cygwin
TinyOS version: 1.x, Boomerang
Programmer: MIB510
Device(s): Mica2, MicaZ, Tmote
Sensor board: homebrew

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

Reply via email to