Hello,

I was wondering if you had any ideas on it. Can't implement MicInterrupt on the tmoteinvent.

Regards

Keerthi

Keerthi Iyengar wrote:
Hey guys,

I had previously asked about MicInterrupts,

I am relatively new to NesC and tinyos programming. I am using the tmote invent and I am compiling using "make tmoteinvent"

In my configuration, I have wired

rcP.MicInterrupt -> MicDriverC; //rcP is my implementation in my program

From the file MicDriverM file in C:\cygwin\opt\moteiv\tos\sensorboards\invent , you need to implement
  async event void MicInterrupt.fired() {
  }

However when i compile it is saying "'fired' is not in interface 'MicInterrupt'

Instead it asks me for 'MicInterrupt.toneDetected' which is something to do with the mica platform from what I have seen. The exact error is:

In file included from rcC.nc:8:
In component `rcP':
rcP.nc:6: interface MicInterruptThreshold not found
rcP.nc:6: interface MicInterruptThreshold not found
In file included from rcC.nc:8:
rcP.nc:36: `fired' is not in interface `MicInterrupt'
rcP.nc:40: `setDone' is not in interface `MicInterruptThreshold'
rcP.nc:13: `MicInterrupt.toneDetected' not implemented

Can someone help me out? I can't see anything wrong with my code.

Regards

Keerthi

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


configuration rcC {
}
implementation {

 components Main;
 components new MainControlC() as MainMicC;
 components rcP;
 components DelugeC;

 components MicDriverC;

 components UserButtonAdvancedC;
 components LedsC;
 components new TimerMilliC() as LedsTimerC;

 Main.StdControl -> rcP;
 MainMicC.SplitControl -> MicDriverC;
rcP.MicInterrupt -> MicDriverC;
 rcP.MicInterruptThreshold ->MicDriverC;

 rcP.Button -> UserButtonAdvancedC;
 rcP.Leds -> LedsC;
 rcP.LedsTimer -> LedsTimerC;

}



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


module rcP{
 provides interface StdControl;

 uses interface MicInterrupt;
 uses interface MicInterruptThreshold;
uses interface ButtonAdvanced as Button;
 uses interface Leds;
 uses interface Timer2<TMilli> as LedsTimer;

}
implementation {


 // StdControl

 command result_t StdControl.init() {
   return SUCCESS;
 }

 command result_t StdControl.start() {
   call Button.enable();
   return SUCCESS;
 }


 command result_t StdControl.stop() {
   return SUCCESS;
 }


 event void LedsTimer.fired() {
 }
async event void MicInterrupt.fired() {

 }

event void MicInterruptThreshold.setDone(uint8_t _gain, result_t _result) {
 }




 // Button clicking

 async event void Button.multiClick( uint8_t count ) {
 }
 async event void Button.longClick( uint32_t time ) {
 }
 }







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

Reply via email to