[Tinyos-help] how to read analogue input on telosb (T-Mote Sky)?
Michael Schippling
schip at santafe.edu
Wed Aug 1 09:56:54 PDT 2007
Well, look at the micasb version. It wraps Photo (or Temp, I never remember)
which further wraps ADC (which does actually do something in-between...).
I'm going to assume that the telosb internal voltage sensor is implemented
as some kind of ADC as well. The basic pattern is:
// in some method, often Timer.fired(), start a conversion:
call ADC.getData();
// Then create an event to catch the conversion result:
async event result_t ADC.dataReady( uint16_t data )
{
// do something with "data"
...
return SUCCESS;
}
I too am sure there was a good reason behind the design approach,
however I'm not always clear on what it might be...
MS
Akos Maroy wrote:
>> Did deeper into DemoSensor. First of course you have to figure out
>> which one and where it is...I don't (yet) have a tmote dev environment,
>> but for the Mica's it's in tos/sensorboards/micasb/DemoSensorC.nc
>
> DemoSensorC on telosb simply calls the internal voltage sensor - it's not
> related to any of the ADC's :(
>
>> What you will find is that it is a dimly veiled layer over an ADC input,
>> which, IMHO, just obscures and obfuscates the usage...
>
> it's true there are a lot of abstraction layers - and it makes it hard to
> figure out what to do :( having said this, I'm sure there is good reason
> behind this design approach.
>
>
> Akos
>
More information about the Tinyos-help
mailing list