Example applications

  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.
  • : Function ereg() is deprecated in /home/project-web/tinyos8051wg/htdocs/includes/file.inc on line 647.

5. Example applications

To 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. The applications are locateded in the mcs51/apps and common/apps directories and make use of the common libraries.

This common directory contains all of the code common to the project found in the diku directory, while mcs51 contains applications only valid for the 8051 based platforms.


 common
 +--apps
 |  +--Echo                         - Echo chars from UART
 |  +--BlinkNoTimerTask             - Blink leds without the use of timers
 |  +--TTXDemo                      - 3 part sample, forward, display app.
 |     +--README                    - Instructions on how to compile and run
 |     +--SampleForwardBase         - Base station with serial connection to PC
 |     +--SampleForwardNode         - Wireless sample, forward mote
 |     +--PC_display                - PC display app.
 |  +--CompressionTest              - Compress data from UART
 |     +--README                    - Instructions
 |  +--TestSimpleMac
 +--lib                             - Platform independent utility libraries
 |  +--logger                       - An event logging library
 |  +--sipmlemac                    - A simple MAC protocol
 |  +--stdout                       - A text printing library (i.e. for debugging)
 |  +--compression                  - A general purpose compression library with plugin
                                      compression methods (simple, lz77, huffman)

5.1 Echo

This 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.

5.2 USBSerialEcho

This 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.

5.3 TTXDemo

This application is split in 3 parts:

  1. A mote samples an analog sensor and sends it wirelessly to a base station
  2. The base station passes the reading to a PC via a UART
  3. The PC displays the reading on the screen

http://www.tinyos8051wg.net/files/Demo_small.png

The README file provided with the application gives full instructions.

5.4 CompressionTest

The 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:

  1. A PC side sends data to the mote using the UART and records the timing.
  2. The mote receives the data, compresses it and sends it back

The README file provided with the application gives full instructions.

5.5 TestSimpleMac

SimpleMac test application for Nano/Micro.4 platforms

5.6 BlinkNoTimerTask

This 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.

5.7 LogRecorder, Testlogger

Part of the logrecorder library (see libraries for further).

5.8 TestAll

Test a variety of device drivers (Uart, Adc, etc.) two platforms:

  • Sensinode Micro.4
  • Texas Instruments cc2430em

The application waits for user input on the UART, the commands are:
l: Toggle Led0
q: Transmit a packet (using SimpleMac)
p: Toggle packet length (13/127)
w: Toggle radio on/off
e: Enable reception
a: Increase channel number (from 11 to 26)
s: Decrease channel number
r: Read a page from FLASH
t: Write a page in FLASH
y: Erase a page in FLASH
u: Read ADC