Skip to content
C++ Code for the Particle Squared air quality board. Use Particle Squared with Particle Argon, Xenon, Boron or with Adafruit feather.
C C++
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Adjust size Apr 3, 2019
lib/BSEC Division in the wrong place Apr 28, 2019
.gitignore Ignoring .vscode Jun 29, 2019
LICENSE Adding license. Cleaning up. Apr 3, 2019 Adding note about BSEC library Jun 25, 2019 Project dependencies Apr 28, 2019

Particle Squared


Particle^2 (pronounced Particle Squared) is a circuit board that helps you monitor the air quality around you. This repository is the code for Particle^2 which enables you to monitor humidity, temperature, air particulates, eC02 and TVOCs in one small package. You can use it with an Adafruit Feather compatible board or the newest mesh enabled boards from Particle. For more information click here.

To get yours go here.

Quick Start:

  1. Clone this repo onto a place on your machine: git clone
  2. Open the repo with Visual Code: (code . using the command line, or file->open)
  3. Open /src/particle-squared.ino
  4. Select your target device in the lower bar (Options are xenon, argon, boron)
  5. Hit cmd + shift + p to get the command menu
  6. Select Compile application (local). You can also choose Cloud flash as long as board.h has not been modified.
  7. Enjoy playing around with your Particle Squared!

Getting the BSEC library included with this project

If you're using the BME680 you'll have to include the static library provided by Bosch. Download the goods here first.

For this project (on any Particle Mesh board) you will want the libalgobsec.a in BSEC_1.4.7.3_Generic_Release/algo/bin/Lite_version/gcc/Cortex_M4F

Add these to the makefile in .particle/toolchains/deviceOS/<version>/firmware-<version>/modules/xenon/user-part for the Particle stuff to work.

LIB_DEPS += $(USER_LIB_DIR)/libalgobsec.a
LDFLAGS += -Wl,--whole-archive $(USER_LIB_DIR)/libalgobsec.a -Wl,--no-whole-archive

Particle Basics

/src folder:

This is the source folder that contains the firmware files for your project. It should not be renamed. Anything that is in this folder when you compile your project will be sent to our compile service and compiled into a firmware binary for the Particle device that you have targeted.

If your application contains multiple files, they should all be included in the src folder. If your firmware depends on Particle libraries, those dependencies are specified in the file referenced below.

.ino file:

This file is the firmware that will run as the primary application on your Particle device. It contains a setup() and loop() function, and can be written in Wiring or C/C++. For more information about using the Particle firmware API to create firmware for your Particle device, refer to the Firmware Reference section of the Particle documentation. file:

This is the file that specifies the name and version number of the libraries that your project depends on. Dependencies are added automatically to your file when you add a library to a project using the particle library add command in the CLI or add a library in the Desktop IDE.

Adding additional files to your project

Projects with multiple sources

If you would like add additional files to your application, they should be added to the /src folder. All files in the /src folder will be sent to the Particle Cloud to produce a compiled binary.

Projects with external libraries

If your project includes a library that has not been registered in the Particle libraries system, you should create a new folder named /lib/<libraryname>/src under /<project dir> and add the .h, .cpp & files for your library there. Read the Firmware Libraries guide for more details on how to develop libraries. Note that all contents of the /lib folder and subfolders will also be sent to the Cloud for compilation.

Compiling your project

When you're ready to compile your project, make sure you have the correct Particle device target selected and run particle compile <platform> in the CLI or click the Compile button in the Desktop IDE. The following files in your project folder will be sent to the compile service:

  • Everything in the /src folder, including your .ino application file
  • The file for your project
  • Any libraries stored under lib/<libraryname>/src


See included LICENSE file.

You can’t perform that action at this time.