Hello
Leds.yellowToggle changes the state of the pin ie. If its already high
it will be made low and, if its already low it will be made high.
I am not familiar with the macro you are using but from its name it only
sets the pin so the LED will only come or stay off (depending on wether
it is high or low side driven) but not flash.
Try this:
1. Declare a Boolean
2. Replace the macro with code to test the boolean, something like;
if bool is true then
set the pin (using the macro)
make bool false
else
reset the pin (using a macro that I bet is there called
TOSH_RESET_YELLOW_PIN() or something very
similar)
make bool true
end if
the idea is that each clause of the if statement will execute
alternately causing the pin to set and then reset. If this does not work
then it would seem that either the mote or the timer is not actually
running.
LEDSC provides functions for turning the LED on and off called
.yellowOn() and .yellowOff(). Unless there is a powerful reason to use
the macros you should use these functions to maintain component
integrity and to make your code easier to debug.
Cheers
Chris
Message: 1
Date: Thu, 14 Oct 2004 12:04:58 -0700 (PDT)
From: archana godavarthy <[EMAIL PROTECTED]>
Subject: [Tinyos-users] basic blink application
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
Hello,
I was trying to make the Leds blink using the Blink
application provided. In this particular application.
I replaces the call Leds.yellowToggle(); with MACRO
TOSH_SET_YELLOW_PIN();
and I have included the #include
"TINYOSDIR/tinyos-1.x/tos/platform/mica2/hardware.h".
It compiles and installs fine. But the Led does not
blink.
Could anyone guide me thru it?
Thanks.
__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo
------------------------------
_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
End of Tinyos-users Digest, Vol 18, Issue 7
*******************************************
_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users