Hi,
if you see the datasheet of tmote sky, in the schematic you can see that the
sensor of light is connected with ADC 4 y 5 of microcontroller. For use a
good point of start is see aplication sense (
http://www.tinyos.net/tinyos-2.x/doc/html/tutorial/lesson5.html).
The before aplication use the component DemosensorC (C:\cygwin\opt\tinyos-
2.x\tos\platforms\telosb). Demosensor use VoltageC (C:\cygwin\opt\tinyos-
2.x\tos\platforms\telosb). VoltageC use Msp430InternalVoltageC
(C:\cygwin\opt\tinyos-2.x\tos\chips\msp430\sensors). Inside of
Msp430InternalVoltageP
is defined the sensor to use:
const msp430adc12_channel_config_t config = {
*inch: SUPPLY_VOLTAGE_HALF_CHANNEL*,
sref: REFERENCE_VREFplus_AVss,
ref2_5v: REFVOLT_LEVEL_1_5,
adc12ssel: SHT_SOURCE_ACLK,
adc12div: SHT_CLOCK_DIV_1,
sht: SAMPLE_HOLD_4_CYCLES,
sampcon_ssel: SAMPCON_SOURCE_SMCLK,
sampcon_id: SAMPCON_CLOCK_DIV_1
};
The values for the struct of above you can find in the file
Msp430Adc12.h(C:\cygwin\opt\tinyos-
2.x\tos\chips\msp430\adc12). In the inch you can select ADC 4 o 5:
enum inch_enum
{
...
INPUT_CHANNEL_A4 = 4, // input channel A4
INPUT_CHANNEL_A5 = 5, // input channel A5
...
};
Using the files Msp430InternalVoltageC and Msp430InternalVoltageP of
template. Modify the names and the values that you need in the struct const
msp430adc12_channel_config_t config. Finally use you new component in your
aplication. The interface Read is very easy to get data. One command for
request the data and an event for get it.
I hope that help you.
A greeting,
Juan Antonio.
2007/4/26, Aleksandr N. Sadkov <[EMAIL PROTECTED]>:
Hello all,
Are there sensor drivers for Tmote Sky in T2?
Does somebody work with Tmote Sky sensors?
Could you show mw example (in T2) of using Tmote Sky sensors?
I would appreciate any link with regarded information.
Thank you, regards, Sadkov Aleksandr.
_______________________________________________
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