Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: synchtemp -> synctemp
Info

This section refers to the following sample application:

  • 04-synctemp

Table of Contents

Running the Application

The 04-synchtempsynctemp sample application showcases the network-wide synchronization of a 

Include Page
_def_smip
_def_smip
 network allowing you to capture temperature measurements across a network synchronized to within a few milliseconds.   It works in concert with the SyncTemp command-line application (part of the SmartMesh SDK), which logs the data.  The SynchTemp SyncTemp directory also includes logAnalysis.py, which will calculate some statistics about the temperature data timing. 

...

Info

While nodes in a

Include Page
_def_smip
_def_smip
network as are synchronized to within a handful of micro-seconds, the precision of the uC/OS-II timers limits the accuracy of the temperature measurement synchronization to a handful of milliseconds.

Implementation Details

The sample application consists of a task which arms a timer, waits for it to expire, then takes a temperature measurement and sends it to the manager.

It uses dn_getNetworkTime() to retrieve the current network time, and arms the timer so it expires at the integer second closest to the reporting period. Since all nodes increment their ASN and UTC time at the same time, this event happens at the same time on all nodes in the network. 

It also contains CLI commands for getting and setting the sample period, and supports setting the period over the air.