Programming TinyOS and Java - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Programming TinyOS and Java

Description:

Sending Messages from the Computer to the mote: java net.tinyos.tools.Pager. I/O ... when adding sensor boards to the mote. ( DO NOT Solder to the Mote! ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 15
Provided by: ared
Category:

less

Transcript and Presenter's Notes

Title: Programming TinyOS and Java


1
Programming TinyOS and Java
  • Andrew Redfern
  • UC Berkeley

2
Outline
  • TinyOS
  • Events
  • Times
  • ADC
  • I/O
  • Java

3
TinyOS Concurrency Model
  • Commands and events are immediately invoked
  • Like a function call
  • Tasks execute to completion before the next task
    starts
  • First in, first out (FIFO)
  • Interrupts are asynchronous with respect to tasks
  • They can happen at any time
  • But do not interrupt other interrupt handlers
  • Code invoked from a task is in task context
  • All tasks should finish, never write a busy loop
  • Code invoked from a interrupt is async or in
    interrupt context
  • Tasks provide concurrency inside a component
  • For longer running operations

4
TinyOS Building Blocks
  • Sample TinyOS applications
  • TOSROOT/apps/
  • Blink (the hello world of TinyOS)
  • CountRadio/
  • CountSend
  • CountReceive
  • OscilloscopeRF

5
TinyOS Java
  • Mote Applications
  • Oscilloscope
  • OscilloscopeRF
  • TOSBase
  • Java Applications
  • SerialForwarder
  • Listen
  • Oscilloscope
  • MIG

6
Running Java Applications
  • SerialForwarder
  • java net.tinyos.sf.SerialForwarder -comm \
    serial_at_COMltXgttelos
  • Listen
  • java net.tinyos.tools.Listen
  • Oscilloscope
  • java net.tinyos.oscope.oscilloscope

7
Interacting with Hardware
8
ADC Example
9
ADC use for an Accelerometer
  • Sample code
  • 3-axis-accelerometer
  • Tools
  • SerialForwarder
  • Oscilloscope

10
User Button
11
CountInput
  • Location
  • apps/CountRadio/
  • COMPInput make install telosb

12
Pager
  • Sending Messages from the Computer to the mote
  • java net.tinyos.tools.Pager
  • I/O
  • Three Leds (Red, Green, Blue)
  • Vibrator Motor

13
Helpful Tips
  • Set your TinyOS Group ID to your class Group ID
  • Use connectors when adding sensor boards to the
    mote. (DO NOT Solder to the Mote!)
  • Be careful not to stress the battery pack
    connectors

14
References
  • TinyOS
  • tinyos.net
  • tinyos tutorial
  • MoteIV
  • moteiv.com
  • My webpage
  • kingkong.me.berkeley.edu/aredfern/
Write a Comment
User Comments (0)
About PowerShow.com