[Tinyos-help] tmote: user button question
Terence Joseph
tjormor at hotmail.com
Thu Aug 3 02:31:04 PDT 2006
Hello,
I am using the following code which I borrowed from CountInputM.nc to allow
me so send data whenever the user button on the tmote is pressed:
async event void UserInput.fired(){
call UserInput.disable();
if (m_int == FALSE){
call Leds.yellowOn();
m_int = TRUE;
}
else{
atomic DestinationAddress = TOS_UART_ADDR;
post sendVariableCnt();
call Leds.yellowOff();
}
call UserInput.clear();
if (!m_taskposted)
if (post startDebounceTimer() == SUCCESS)
atomic m_taskposted = TRUE;
}
However, every time I install my application for the first time the blue Led
(called with Leds.yellowOn()) goes on (as if the user button had been
pressed even though it hasn't) and I have to press the reset button to
restart the application. Can anyone explain why this is happening and what
I can do to prevent it? Many thanks.
Best Regards,
Terence
_________________________________________________________________
Find a baby-sitter FAST with MSN Search! http://search.msn.ie/
More information about the Tinyos-help
mailing list