On Tuesday 03 July 2007 05:12:18 pm John Griessen wrote:
> I would like to find any TinyOS-2.0 example code for the telosb to help me
> make a platform variant based on it.  For instance, I see in
> /tinyos-2.x/tos/chips/sht11
> generic module SensirionSht11LogicP()  and other interfaces built on top
> of it, but no
> example turns up for telosb.  Know anywhere else to look?

Look at the Oscilloscope app in $TOSROOT/apps.   Note that it creates a new 
DemoSensorC() component and uses its Read interface to retrieve data from a 
sensor.

Look at SensirionSht11C.nc in $TOSDIR/platforms/telosa/chips/sht11.  It 
provides Read interfaces for reading temperature and humidity from an sht11.

With a custom DemoSensorC.nc component, placed in your project's home 
directory so that it takes precedence, you can then read temp (or humidity) 
via the Oscilloscope app.  The DemoSensorC.nc is very simple:

generic configuration DemoSensorC() {
  provides interface Read<uint16_t>;
}
implementation {
  components new SensirionSht11C() as DemoSensor;
  Read = DemoSensor.Temperature;
}

The telosb platform inherits from the telosa platform, so this setup should 
work fine on either, I'd think.

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

Reply via email to