Firmware

Matt Bartos edited this page Sep 19, 2017 · 4 revisions

The firmware contains all the instructions that the sensor node needs to take measurements of environmental data, control attached devices, and communicate with a web server. The following firmware files provide the essential functionality for the sensor node.

  • [ main.c ] contains the main ''operating system'' for the sensor node. At a recurring interval, this program (i) ''wakes'' the board from sleep mode, (ii) takes measurements using the attached sensors, (iii) connects to the cellular network, (iv) sends sensor data to a web server, (v) updates device metadata and onboard parameters, (vi) triggers attached actuators, and (vii) puts the board back into sleep mode.

  • [ data.c ] implements the sensor subroutine, metadata updater, trigger updater, and parameter updater.

  • [ modem.c ] contains functions for connecting to the cellular network, and sending/receiving packets.

  • [ updater.c ] implements parsers needed for the metadata, trigger, and parameter updater subroutines.

  • [ ultrasonic.c ] contains routines for taking measurements using the Maxbotix depth sensor.

  • [ decagon.c ] contains routines for taking measurements using the Decagon soil moisture probe.

  • [ autosampler.c ] contains routines for taking measurements using the ISCO autosampler.

  • [ valve.c ] contains routines for controlling an attached valve via an actuator.

Main loop

The sensor node's main routine (as implemented in main.c) is shown below:

Main

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.