hi all ,
i use tinyos.1-x, i am trying to program the telosb with a very simple application which is my first trying; this application does the following:
when the value of ADC is more of 3 ,the redled is on if no the redled is off.but the problem is when i try to compile this application to main.exe by using
ncc -o main.exe -target=telosb PeriodicValue.nc
i have always the error as following:
PeriodicValueM.nc:9: syntax error befor 'display'
PeriodicValueM.nc: StdControl isnot implemented
PeriodicValueM.nc: StdControl isnot implemented
PeriodicValueM.nc: StdControl isnot implemented
PeriodicValue.nc:8: too many arguments
My application is the following( note: i am very new in this , i think i have some errors and i need to your help, if any body has a doc.)
PeriodicValueM.nc
module PeriodicValueM {
provides interface StdControl;
uses interface Timer;
uses interface ADC;
uses interface Leds;
}
implementation {
result_t display(uint16_t value)
{
if (value &1) call Leds.redOn();
else call Leds.redOff();
return SUCCESS;
}
command result_t StdControl.init() {
return call Leds.init();
}
command result_t StdControl.start() {
return call Timer.start(TIMER_REPEAT,1000);
}
command result_t StdControl.stop() {
return call Timer.stop();
}
command result_t Timer.fired() {
return call ADC.getData();
}
async event result_t ADC.dataReady(uint16_t data) {
display(7-((data>>7) &0x7));
return SUCCESS;
}
}
PeriodicValue.nc
configuration PeriodicValue {
}
implementation{
components Main,LedsC,TimerC,PeriodicValueM;
Main.StdControl -> PeriodicValueM;
Main.StdControl -> TimerC;
PeriodicValueM.Leds -> LedsC;
PeriodicValueM.Timer -> TimerC.Timer[unique("Timer")];
}
i wait your help,thank you.
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
