Navigation |
Example applications4. Code OverviewYou can browse the code online here, download a copy. The code is located under the DIKU projects in the TinyOS contrib section. The code is split in 3 places: the mcs51 specific, sensinode specific and platform independent (common). A few simple examples are provided in the mcs51 section, more elaborate examples are provided as part of the "common" section of the . The Sensinode Nano platform is provided in the sensinode section. 4.1 CommonThis directory contains all of the code common to the project found in the diku directory. The provided applications and libraries are compatible with all the provided platforms.
3.2 mcs51This directory contains all the code specific for the 8051 platforms (e.g. CC2430)
4.3 SensinodeThis directory contains the code specific to the Sensinode platform (e.g. Nano and Micro.4)
3. Example applicationsTo get you started with the platform a few example applications have been provided (see below for full list). Here we will describe a few of them. For all of them compile them as above. 3.1 EchoThis application receives characters from the UART and sends them back. Compile and install the application and connect a terminal emulator to the serial port (230400 baud, 8n1) and type away. 3.2 USBSerialEchoThis appliation is indentical to Echo exept it uses the USB serial port emulation (USB Communication Class device). So while this application is very simple it tests the rather complicated USB CDC implementations. 3.3 TTXDemoThis application is split in 3 parts:
The README file provided with the application gives full instructions. 3.4 CompressionTestThe CompressionTest compresses data on a mote using one of 3 algorithms: lz77, huffmann or simple. The data is sent from a PC that also records the timing. It has two parts:
The README file provided with the application gives full instructions. 3.5 TestSimpleMacSimpleMac test application for Nano/Micro.4 platforms 3.6 BlinkNoTimerTaskThis application replaces the Echo application from the main distribution (which will not work with certain 8051 compilers e.g. Keil, IAR). It blinks the Led's with out using a timer using a simple delay loop. This application is much simpler than the Blink application from the main TinyOS distribution which requires operational timers. In addition it uses a task as opposed to Blink, since at least 1 task is required by some of the compilers supported by the TinyOS 8051wg port. 3.7 LogRecorder, TestloggerPart of the logrecorder library (see libraries for further). 3.8 TestAllTest a variety of device drivers (Uart, Adc, etc.) two platforms:
The application waits for user input on the UART, the commands are:
|