Skip to content
The first Spark firmware library. To exemplify naming conventions and required files.
C++ Makefile C
Branch: master
Clone or download
suda Merge pull request #18 from spark/feature/libraries-v2
Update example library to V2 format
Latest commit ad4dfd8 Jan 23, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Update Jun 9, 2014
src Updated examples and readme Jul 13, 2015
test Move examples and tests. Closes #17 Apr 21, 2016
.gitignore Update library config example Apr 21, 2016
LICENSE add MIT license May 22, 2014 Update readme Apr 21, 2016


This repo serves as the specification for what constitutes a valid Spark firmware library and an actual example library you can use as a reference when writing your own libraries.

Particle Libraries can be used in the Particle IDE. Soon you'll also be able to use them with the Particle CLI and when compiling firmware locally with Particle firmware.

Table of Contents

This README describes how to create libraries as well as the Particle Library Spec.

The other files constitute the Particle Library itself:

Getting Started

1. Install Particle CLI

$ npm install -g particle-cli

2. Init new library

$ particle library init this-is-my-library-name
  • Replace this-is-my-library-name with the actual lib name. Your library's name should be lower-case, dash-separated.

3. Edit the, firmware .h and .cpp files

  • Use this repo as your guide to good library conventions.

4. Create a GitHub repo and push to it

5. Validate and publish

$ particle library validate


$ particle library publish

Getting Support


This repo is meant to serve as a place to consolidate insights from conversations had about libraries on the Particle community site, GitHub, or elsewhere on the web. "Proposals" to change the spec are pull requests that both define the conventions in the README AND illustrate them in underlying code. If something doesn't seem right, start a community thread or issue pull requests to stir up the conversation about how it ought to be!

You can’t perform that action at this time.