I use the MicStreamC to sample sound. To test the sampling time, I set the red
light on at the beginning of the program, and then

#defind SAMPLE_LENGTH 100
call MicReadStream.postBuffer(sampleBuf, SAMPLE_LENGTH);
call MicReadStream.read(1000);

finally, I set the green light on in MicReadStream.readDone(error_t result,
uint32_t actualPeriod) .

event void MicReadStream.readDone(error_t result, uint32_t actualPeriod)
{
call Leds.led1On();// the green light
}

Then I run the program on micaz node, and I used a timer to test the time
from the red light on to the green light on. but I get that it used about
1.2 second.

Then I changed the parameter in MicReadStream.read() to MicReadStream.read(1)
 MicReadStream.read(2)  MicReadStream.read(10)  MicReadStream.read(100) ,
and the time it used remain the same.

I wonder if there is a limit frequency for mts300 or tinyos to sample data.

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

Reply via email to