MicroPython

Drupal 11: Controlling LED Lights Using A REST Service

Following on from my article looking at the Pimoroni Plasma 2350 W I decided to do something interesting with the Wifi interface that would connect to a Drupal site.

The firmware of the Plasma 2350 W from Pimoroni comes with an example that connects to a free API to update the colour randomly. Once I saw this in action I realised that it shouldn't be too hard to convert that to pull the data from a Drupal REST service instead.

It is quite easy to create RESTful services in Drupal; it just needs a single class. All I would need to do is create a form to control the colour that is selected in the REST service.

Creating Better LED Lights With The Pimoroni Plasma 2350 W

It's that time of year again (Decemberween) so I was looking around for a set of addressible LED string lights to set up.

When you get a set of LED lights from your local supermarket they will often be either a single circuit or a set of multiple circuits. This means that they are either all on, or can alternate in a set number of patterns. This is frankly rather dull.

What supermarkets don't have is addressible LED string lights. In these lights each LED on the wire can be address individually to set the colour or brightness. You can tell if the lights are addressible as they will have three cables, two for power, and one for communicating with the lights.