Maarten Ectors
on 16 October 2015


This article was last updated 5 year s ago.

Victor Palau created a very nice blog post around the PiGlow. With his permission we are reproducing it here.

My first steps into snappifying, I have publish a RestApi for PiGlow (glowapi 0.1.2). I though it might be a good first step and mildly useful for people wanting to set up build notifications, twitter mentions, whatever you fancy!

You can find it in the webdm store…
Code is here: https://code.launchpad.net/~vtuson/+junk/glowapi

And here is how it works:
PiGlow Api exposes PiGlow in your board port 8000, so you can easy accessing by POST in port 8000.

remeber to do the hardware assign, something like: sudo snappy hw-assign glowapi.vtuson /dev/i2c-1

API calls , method POST:

v1/flare
turns all the leds on to max brightness
v1/on
turns all the leds on to med brigthness
v1/clear
turns off all leds
v1/legs/:id
turns all the leds in a leg (:id) to a given brightness
(if not specify it uses a default setting)
parms: intensity , range 0 to 1
eg: http://localhost:8000/v1/legs/1?intensity=0.3
v1/legs/:id/colors/:colid
turns on one led (colid) in a leg (:id) to a given brightness
(if not specify it uses a default setting)
parms: intensity , range 0 to 1
eg: http://localhost:8000/v1/legs/1/colors/green?intensity=0.3
v1/colors/:colid
turn on all leds for a color across all legs
if not specify it uses a default setting)
parms: intensity , range 0 to 1
eg: http://localhost:8000/v1/colors/green?intensity=0.3

ID ranges
legs range : 0 – 2
colors:
green
white
blue
yellow
orange
red


Newsletter
signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts


Gabriel Aguiar Noury
19 June 2025

What are our partners building for device makers? Explore the highlights from Ubuntu IoT Day Singapore

Article Internet of Things

Our first Ubuntu IoT Day in Southeast Asia – and our first ever event in Singapore! It was long overdue, as several attendees were quick to remind us. Ubuntu has long been a quiet force in the region, powered by its rich ecosystem of innovators. More than 150 participants came together to represent Southeast Asia’s

Gabriel Aguiar Noury
19 June 2025


Ubuntu IoT Day in Singapore – Unlock compliant and scalable innovation in edge AI

Article Internet of Things

Singapore | May 27, 2025 | Full-day event How do you build robust, performant edge AI infrastructure? This is the question organizations are asking themselves when looking to capitalize on the opportunity of edge AI. Ubuntu IoT Day is your opportunity to find out – and it’s coming to Singapore! Join us on May 27


Andreea Munteanu
19 March 2025

Unlocking Edge AI: a collaborative reference architecture with NVIDIA

Partners AI

The world of edge AI is rapidly transforming how devices and data centers work together. Imagine healthcare tools powered by AI, or self-driving vehicles making real-time decisions. These advancements rely on bringing AI directly to edge devices. However, building a robust architecture for diverse edge environments...

Andreea Munteanu
19 March 2025