MansOS tutorial

From DiLab
Revision as of 15:49, 13 October 2011 by Atis (talk | contribs) (New page: == Getting MansOS == See MansOS installation guide. For the purposes of this tutorial, you will need: * MansOS sources. The recommended way is to cecking them out ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Getting MansOS

See MansOS installation guide. For the purposes of this tutorial, you will need:

  • MansOS sources. The recommended way is to cecking them out from SVN by using command "svn co http://mansos.net/svn/mansos/ mansos"
  • Development tools, such as msp430-gcc compiler
  • Common UNIX command line tools, such as make
  • A working Python installation
  • At least one mote (Tmote Sky, Arduino, Epic mote, SADmote etc.) on which to run the application
    • If you don't have any motes, then you can just run MansOS using its built-in simulation platform "pc"

Building and running your first application

Change location in MansOS root directory to mansos/apps/demo/Blink.

Now compile the application and program it in the device.

If you have Tmote Sky:

make telosb upload

If you have Arduino:

make atmega upload

If you have SADmote:

make telosb upload-msp430

For testing the application on simulator:

make pc run

Debugging an application

PRINTF...

minicom...

Analysis of a MansOS application

main.c

Makefile

config

MansOS shell

Demo application...

PC command line tool...

Commands...

MansOS features

MansOS has support for:

  • LEDs
    • On Tmote Sky: red, green, and blue
    • On SADmote: just red
    • On Arduino: just yellow
  • Bidirectional serial port communication
    • Listening to serial port
    • Writing to serial port
  • Radio communication
    • Including measuring the strength of received radio signal in different channels
    • In this way, a primitive spectrum analyzer can be built!
  • Network stack
    • Sending data to a specific mote in the network
    • Sending data reliably
    • Collecting data from the whole network
  • Storing data on flash or SD card, optionally using a file system.
  • Sensors:
    • Light
    • Temperature
    • Humidity
    • Accelerometer and gyroscope
    • Data from a GPS device
    • Other sensors using analogue interface. Just specificy the correct ADC channel you want to read and voila!
    • Other sensors using digital I2C interface (you wikll need to write your own driver for this; hovever, it may be not as hard as it sounds)
  • LCD
  • Low power modes:
    • msleep() and usleep() functions will automatically put the sensor device in low power mdoe

How different features of MansOS can be turned on and off?

config files

Default config file...

Can MansOS be used just as a library? =

Yes...