Skip to content

air-quality-wing-zephyr-demo

air-quality-wing-zephyr-demo

mason

Published July 03, 2023 · © Apache License 2.0 (Apache-2.0)

Original author: Jaredwolff · United States of AmericaOriginal source (new tab)

air-quality-wing-zephyr-demo

Components

Hardware components

WIZnet parts

Project description

This source code is part of an application that works with the Zephyr RTOS, a program that collects and processes data from air quality sensors. The main parts and functions of the source code are as follows.

Include header: Contains various libraries and modules related to Zephyr, especially using sensor data coding and network related libraries.

Sensor data definition: Declare a struct array named sensor_data to store multiple sensor data items.

Handling date and time events: The date_time_evt function starts the Golioth system client when the system receives the current time.

Publish Data: The publish function encodes the sensor data and sends the data to Golioth LightDB in CBOR format.

Main function:

  • Reset: Initializes the network and Bluetooth Center.
  • Event Loop: The application continuously checks for events, adding sensor data to the array whenever it receives Bluetooth data.
  • Publish data: When enough sensor data is accumulated, call publish function to publish data.
  • handle ethernet ready event: Do a time update when ethernet is ready.

This code is responsible for centrally processing and remotely transmitting the data collected by air quality sensors, so it could be used in IoT devices or air quality monitoring systems.

Documents

  • air-quality-wing-zephyr-demo

Comments

Similar projects you might like

Comments