Hello everyone!
I want to read ADC port in TOS2. 

In TOS 1, I used ADC and ADCControl interface to directly read from ADC port of 
TMoteSky motes (as shown below). In TOS2, however, I can't find an interface to 
read ADC port. I would appreciate if you can guide me in reading ADC port in 
TOS2.

**part of Header file
=============
 enum {

   TOS_ADC_ADC0_PORT = unique("ADCPort"),

   TOSH_ACTUAL_ADC_ADC0_PORT = ASSOCIATE_ADC_CHANNEL(

     INPUT_CHANNEL_A0,

     REFERENCE_VREFplus_AVss,

     REFVOLT_LEVEL_2_5

   ),

};


**Wiring:
==========
...............[here ADCtoRadioM.nc is the mail application]
  ADCtoRadioM.ADCO -> ADCC.ADC[TOS_ADC_ADC0_PORT];
   ADCtoRadioM.ADCControl -> ADCC;
...............

**Application:
=========
    call ADCControl.init();
    call ADCControl.bindPort( TOS_ADC_ADC0_PORT, TOSH_ACTUAL_ADC_ADC0_PORT );
.............
.............
      call ADCO.getData();
..............
..............
  async event result_t ADCO.dataReady(uint16_t adcdata)
  {}
.............

Now, can anyone please tell me how I can read ADC port in TOS2?

Thanks,
Shafique



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

Reply via email to