Lab Activity: TinyOS Button

Since

23.10 lab

Till

06.11 lab

Points

1

Write an app that reacts on pressing and releasing the user button.

When the button is pressed, it turns on LED 0 and prints message:

Button pressed.\n\r

When the button is released, it turns off LED 0 and prints message:

Button released after X seconds.\n\r

where X is the number of whole seconds when the button was pressed.

Be inspired by apps/tests/TestPrintf and apps/tests/telosb/TestUserButton apps.