1. Martín René Vilugrón
  2. tinyos-sdk

Overview

TinyOS SDK

TinyOS

http://www.tinyos.net/

TinyOS is an open source, BSD-licensed operating system designed for low-power wireless devices, such as those used in sensor networks, ubiquitious computing, personal area networks, smart buildings, and smart meters. A worldwide community from academia and industry use, develop, and support the operating system as well as its associated tools, averaging 35,000 downloads a year.

Lib Authors Author James Razvan Musaloiu-E. <razvanm@cs.jhu.edu> Author James David Purdy <david@radioretail.co.za>

Example

#For use with RadioCountToLeds from /apps

import tos import sys

AM_RADIO_COUNT_MSG = 6

class RadioCountMsg(tos.Packet):
def __init__(self, packet = None):
tos.Packet.__init__(self,
[('seq', 'int', 2)
],

packet)

if '-h' in sys.argv:
print "Usage:", sys.argv[0], "serial@/dev/ttyUSB0:57600" sys.exit()

am = tos.AM()

while True:

p = am.read() if p and p.type == AM_RADIO_COUNT_MSG:

msg = RadioCountMsg(p.data) print msg