Simple LIFX API + Internet Button Project (with video)

Hey all,

This is my first Particle and programming project. There’s more advanced Particle -> LIFX projects out there but this might be helpful for beginners. It uses the LIFX HTTP API, which means more latency but it is simpler than working with the LIFX LAN protocol.

The project enables you to change the brightness and colors of the LIFX bulb. Here’s a 30sec video of how it works:

To replicate this project:

  1. Copy LIFX_cycle_beta.json and replace YOUR_LIFX_API_KEY with the key from LIFX.
  2. Create a webhook with the above json file (guide)
  3. Add LIFX_button_beta.ino to a new Particle app.
  4. Include the internet button library in the app.
  5. Flash your the firmware for your Internet Button and play!

Any thoughts? ideas or feedback?

  • One thing I couldn’t figure out how to do is add a universal delay (it’s added for each button press as a separate line).

  • I also looked at making the button light up when a OK response received, but the LIFX API response is noticeably slower than the light change, so the feature wouldn’t be too helpful.