[Tinyos-help] Telosb TSR light sensor problem

Tatiana Bokareva tbokareva at cse.unsw.edu.au
Sun Nov 5 21:12:28 PST 2006


Hello everyone,

I am trying to get values from TSR sensor on Tmote sky.
I followed the example in $TOSDIR/contrib/moteiv/apps/Oscilloscope/

Did the standard
myApp.nc:
components HamamarsuC;

Main.StdControl-> HamamatsuC;

myAppM.TSR -> HamamtsuC.TSR;

in myAppM.nc

uses {
     interface ADC as TSR;
}
I have a time to collect N number of readings and put in the array

  event result_t SensorPullTimer.fired(){
     call  TSR.getData();
     return SUCCESS;
   }

   async event result_t  TSR.dataReady(uint16_t data){
     atomic {
       if(pos == DATA_PAGE-1){
 	 readings[pos] = data;
 	 pos = 0;
 	 call SensorPullTimer.stop();
 	 post Write_Data();
       }else{
 	readings[pos] = data;
 	pos++;
       }
     }
     return SUCCESS;
   }

All I get is FFFF values even when I cover sensor with my hand. I read 
from: http://www.cs.berkeley.edu/~pal/mate-web/tutorials/lesson2.html

"Note that some Telos motes do not have their sensors populated. This 
causes the totalsolar and photoactive sensors to return bogus values: they 
are simple ADC captures. In contrast, the humidity and temperature 
functions interact with digital sensors over a bus; if they are not 
populated, the VM will enter an error state."

I am not sure what this means, but does any one know how to fix it?
Otherwise can some one point me into the direction of how to get TSR sensor 
working.

Regards Tatiana.


More information about the Tinyos-help mailing list