test code for TinyOS