This project uses an ESP32 module connected to a NeoPixel array to display the status of a CircleCI build (passing, building or failing).
- ESP32 module
- NeoPixel array (strip or ring)
- 3x socket-to-socket wires
With the ESP32 module disconnected from your laptop
- Connect a wire between the
gnd
pin of the ESP32 module and thegnd
pin of the NeoPixel array. - Connect a wire between the
vin
pin of the ESP32 module and thepwr
pin of the NeoPixel array. - Connect a wire between the
d13
pin of the ESP32 module and thein
pin of the NeoPixel array.
After connecting the ESP32 module to your laptop, set up a new PlatformIO project as described in the README.
Load up the build-monitor
project into PlatformIO, the entrypoint is main.cpp
. Follow the steps below to understand what is being added in each step.
- Start a
Serial
connection (great for debugging) - Start the NeoPixel strip
- You will need to set
NEOPIXEL_LENGTH
appropriately based on your NeoPixel array)
- You will need to set
- Set all of the NeoPixels to a plain white colour
- Set up a WIFI connection
- You will need to copy
include/secrets.h.example
toinclude/secrets.h
and populate it. Don't commit it anywhere!
- You will need to copy
- Communicate with CircleCI to get information about a build and work out its status (building, passing, failing or unknown)
- Write out the build status to
Serial
.
- Use the build status to display a certain colour for different build statuses
- Display a progress spinner for the "building" status