This repository presents a generic embedded framework designed to simplify the integration and management of various air quality sensors in embedded systems.
The primary goal is to provide a unified API that allows developers to interface with multiple sensor types such as: SGP30, SGP40, EN161, and CCS811 using the same set of functions and data structures.
- SAM D21 CURIOSITY NANO EVALUATION KIT or PIC18F56Q71 CURIOSITY NANO EVALUATION KIT
- One of the core goals of this framework is to ensure it works on any Microchip (MCHP) microcontroller unit (MCU). The abstraction layers and hardware interface modules are designed to be portable across the entire Microchip MCU portfolio, making it easy to deploy your air quality monitoring solution on any MCHP device.
- CURIOSITY NANO BASE FOR CLICK BOARDS
- Supported Sensors:
- MPLAB® X IDE 6.25.0 or newer (MPLAB® X IDE 6.25.0)
- MPLAB® XC32 4.6.0 or newer compiler (MPLAB® XC32 4.6.0)
- MPLAB® XC8 3.10.0 or newer compiler (MPLAB® XC8 3.10.0)
- MPLAB® Code Configurator 5.6.2 or newer (MCC v5.6.2)
The repository is organized to help quickly understand and implement the Embedded-framework-AQ-sensor in embedded projects. Here is how the structure supports the development:
-
Framework Folder: The main folder, Embedded-framework-AQ-sensor, contains a comprehensive README file. This document explains the framework’s architecture, supported sensors, API usage, and integration steps. It is the primary resource for understanding how to use the framework with any supported sensor and Microchip MCU.
-
Device Example Folders:
- PIC18F56Q71: Contains a complete example project demonstrating the framework running on a PIC18F56Q71 microcontroller
- SAMD21G17D: Contains a complete example project for the SAMD21G17D microcontroller
- Each folder includes a dedicated README file with step-by-step instructions for hardware setup, software configuration, and running the example ( PIC18F56Q71 Readme ; SAMD21G17D Readme )
-
Add the Embedded-framework-AQ-sensor to the project
-
Depending on the architecture of the Microcontroller the developer will have to change the following:
a. generic_driver_interfaces.h:b. AQIsensor.c
- Add the respective function names to the generic_comms interface
- XC32 compiler doesn't support "__delay_ms", therefore in such cases create the function with same name and include the delay logic

c. AQIsensor.h
- To run the example project, navigate to the folder corresponding to the target device (PIC18F56Q71 or SAMD21G17D)
- Each folder contains a README file with detailed instructions on hardware connections, software setup, and project execution
- Follow the steps in the respective README documents to successfully build and run the air quality sensor framework example on the chosen Microchip MCU






