[Tinyos-help] Problem on detecting ultrasound using Cricket mote

hukang hukang at ic.sunysb.edu
Thu Apr 2 11:28:56 PDT 2009


Hi,
I have a question aboutt using Cricket mote to detect the ultraound
pulse. Suppose I have two motes, one sends ultrasound pulse 
and one receiver to detect the ultrasound pulse. I am sure that the
sender sends ultrasound correctly, but the
receiver can not detect it. Here is the code on the receiver

stdcontrol.init(){
	call UltrasoundControl.SetGain(64);
	}
	
/* timer fires every 5500ms*/
Timer.fired() {	
	call UltrasoundControl.StartDetector(5000);
}

async event result_t UltrasoundControl.PulseDetected(uint16_t timer)
 {
      		call Leds.yellowToggle();
      		return SUCCESS;
 }
 The problem is that the yellow led never toggle. Is the SetGain
function used correctly?
 Could any one give me some help? Thanks.

- Hui


More information about the Tinyos-help mailing list