NXTMOTE
TinyOS is a small operating for small (wireless) sensors. LEGO MINDSTORMS NXT is a platform for embedded systems experimentation: The combination of NXT and TinyOS is NXTMOTE.
Getting Started
A good place to start is the AT91SAM7] PDF. It contains register definitions and provides an overview of the ARM7 processor in NXT.
To understand the software provided by LEGO one should download it from the LEGO website. LEGO's own software for NXT is based on a small virtual machine. Furthermore, inside the operating system there are a number of modules which are updated in a round robin fashion each one ms.
After having read the hardware specification and the PDF documents that comes with the LEGO software it is time to look at the NXTMOTE software. This platform aims to do provide both the LEGO software wrapped in nesC for compatibility and completeness reasons and also expose a set of API components (HPL, HAL, and HIL) providing access to the expected TinyOS functionality on this platform.
You also need a MINDSTORMS set and for educational purposes the LEGO® MINDSTORMS® Education Base Set is best. An equally fine option is to buy a MINDSTORMS set from a local store.
Setting up the host
There is a tutorial available the outlines some options for setting you machine. A nice utility called fwflash enables direct download of a nxtmote.bin image using the USB cable that comes with NXT.