Hi all,

Can someone explain me how to use ADC interface.
I have read that I need this code :

enum {
                TOS_ADC_TEMPAVERAGE_PORT = unique("ADCPort"),
                TOSH_ACTUAL_ADC_TEMPAVERAGE_PORT = ASSOCIATE_ADC_CHANNEL(
                INPUT_CHANNEL_A0,
                REFERENCE_VREFplus_AVss,
                REFVOLT_LEVEL_1_5
                ),
        };

but it generates errors :

In component `TempAverageM':
TempAverageM.nc:14: implicit declaration of function `ASSOCIATE_ADC_CHANNEL'
TempAverageM.nc:15: `INPUT_CHANNEL_A2' undeclared here (not in a function)
TempAverageM.nc:16: `REFERENCE_VREFplus_AVss' undeclared here (not in a
function)
TempAverageM.nc:18: `REFVOLT_LEVEL_1_5' undeclared here (not in a function)
TempAverageM.nc:18: enumerator value for `TOSH_ACTUAL_ADC_TEMPAVERAGE_PORT' not
integer constant
TempAverageM.nc: In function `StdControl.init':
TempAverageM.nc:35: `TOSH_ACTUAL_ADC_AVERAGE_PORT' undeclared (first use in this
function)
TempAverageM.nc:35: (Each undeclared identifier is reported only once
TempAverageM.nc:35: for each function it appears in.)
In component `TempAverage':
TempAverage.nc: At top level:
TempAverage.nc:10: `TOS_ADC_TEMPAVERAGE_PORT' undeclared here (not in a
function)
make: *** [exe0] Error 1

Can you help me ?

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

Reply via email to