This firmware project was created using Particle Developer Tools and is compatible with all Particle Devices.
Feel free to replace this README.md file with your own content, or keep it for reference.
- Introduction
- Prerequisites To Use This Template
- Getting Started
- Particle Firmware At A Glance
- Support and Feedback
- Version
For an in-depth understanding of this project template, please refer to our documentation.
To use this software/firmware on a device, you'll need:
- A Particle Device.
- Windows/Mac/Linux for building the software and flashing it to a device.
- Particle Development Tools installed and set up on your computer.
- Optionally, a nice cup of tea (and perhaps a biscuit).
-
While not essential, we recommend running the device setup process on your Particle device first. This ensures your device's firmware is up-to-date and you have a solid baseline to start from.
-
If you haven't already, open this project in Visual Studio Code (File -> Open Folder). Then compile and flash your device. Ensure your device's USB port is connected to your computer.
-
Verify the device's operation by monitoring its logging output:
- In Visual Studio Code with the Particle Plugin, open the command palette and choose "Particle: Serial Monitor".
- Or, using the Particle CLI, execute:
particle serial monitor --follow
-
Uncomment the code at the bottom of the cpp file in your src directory to publish to the Particle Cloud! Login to console.particle.io to view your devices events in real time.
-
Customize this project! For firmware details, see Particle firmware. For information on the project's directory structure, visit this link.
The firmware includes a logging library. You can display messages at different levels and filter them:
Log.trace("This is trace message");
Log.info("This is info message");
Log.warn("This is warn message");
Log.error("This is error message");
Particle projects originate from the Wiring/Processing framework, which is based on C++. Typically, one-time setup functions are placed in setup()
, and the main application runs from the loop()
function.
For advanced scenarios, explore our threading support.
By default, the setup() and loop() functions are blocking whilst they run, meaning that if you put in a delay, your entire application will wait for that delay to finish before anything else can run.
For techniques that allow you to run multiple tasks in parallel without creating threads, checkout the code example here.
(Note: Although using delay()
isn't recommended for best practices, it's acceptable for testing.)
For firmware testing and debugging guidance, check this documentation.
This project provides a YAML file for GitHub, automating firmware compilation whenever changes are pushed. More details on Particle GitHub Actions are available.
To learn how to utilize Particle's OTA service for device updates, consult this documentation.
Test OTA with the 'Particle: Cloud Flash' command in Visual Studio Code or the CLI command 'particle flash'!
This firmware supports binary assets in OTA packages, allowing the inclusion of audio, images, configurations, and external microcontroller firmware. More details are here.
For support or feedback on this template or any Particle products, please join our community!
Template version 1.0.2