Again, read that tutorial...but the quick answer, in T1 at least, is:

In the config file:

 components ADCC;
 RobotM.Target -> ADCC.ADC[ROBOADC_TARGET];

In the "RobotM.nc" code:

 uses   interface ADC as Target;

 call Target.getData();

 async event result_t Target.dataReady(uint16_t d)
 {
        return SUCCESS;
 }

Look at the ADC and ADCControl interfaces for other things you can do.
MS


Abdullah Kadri wrote:
Dear All,

I am wondering how can I setup the port from which getData( ) function will use to get the analog data?

Best,

Abdullah Kadri, P.Eng., Ph.D. Candidate
The University of Western Ontario
Department of Electrical and Computer Engineering
Phone: (519) 661-2111 ext. 81271


------------------------------------------------------------------------

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

Reply via email to