Low power wireless standards combined with low cost and ultra-miniature LEDs made smart lighting solutions a catalyst for the Internet of Things and home automation.

In this tutorial, we’ll see how to control an Adafruit NeoPixel ring via mobile using Python and JQWidgets. In particular, we’ll see how to use Zerynth Studio to program the microcontroller-based board in Python and how to use Zerynth App to run the JQWidget-based GUI.

Why using Zerynth App to remote control Neopixels

In case you missed the tutorial on how to make beautiful IoT Dashboards using Zerynth, Zerynth App is a mobile application that allows fast prototyping of graphical interfaces for your IoT projects. Through the Zerynth App, you can run beautiful responsive Graphical User Interfaces using HTML, CSS and JavaScript. No need for Android or iOS code!

In particular, Zerynth App enables a bidirectional communication channel between Zerynth-powered devices and your mobile. We’ve already seen how to send data from a Zerynth-powered device and use the Zerynth App as the remote display. You can consider this tutorial as the other side of the same coin: we’ll see how to control your device via the Zerynth App, used as a remote controller.

Let’s start!

Required Material

First of all, you need a board. You can select one of the 32-bit microcontroller devices supported by Zerynth. We’ve chosen the Particle Photon, a very popular Wi-Fi enabled development board for creating IoT projects.

You also need an Adafruit Neopixel ring (or a strip) and a breadboard.

Last but not least, you need:

Zerynth Studio , our powerful IDE for embedded programming in Python that enables the IoT. You can download it here.

, our powerful IDE for embedded programming in Python that enables the IoT. You can download it here. Zerynth App. You can download it here.

Assembling

Just put the USB-powered Particle Photon on the breadboard and connect it to the Neopixel ring as follows:

Neopixel +5V to Vin pin of the Particle Photon

Neopixel GND to GND pin of the Particle Photon

Neopixel “Data In” pin to a digital pin of the Particle Photon

If you want to use more Neopixels or if you want to power the system in a different way, take care of the info you can find here: Basic Connections, Best Practices, Powering NeoPixels.

Programming

Once you have installed Zerynth Studio and created a Zerynth user, you have to register and virtualize the board. Take a look at the Zerynth official documentation for the Particle Photon for a quick getting started.

Now you can start to program your board in Python!

Create a new project and edit the main.py file as follows: