IOT Ambient Light: VIPER Lamp

Written by: admin@makezilla

Picture of IOT Ambient Light: VIPER Lamp


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

In this tutorial we'll see how to control a NeoPixel LED strip via mobile using the VIPER App, that shows a color picker and a menu for the selection of various pre-configured animations.

Step 1: Required Material

Picture of Required Materialimages.jpgDSC_3971.jpg

The project requires few elements:

  • VIPER IDE: a multi-platform and browser-based Python development environment with cloud sync and board management features. No matter which OS you use, VIPER runs! Just download VIPER and install it (
  • VIPER APP: the VIPER mobile interface for smart objects and IoT systems. Any mobile will become the objects display and remote controller. Download:
  • TOI Shield (available here: ). A ready to use multi-sensors board that adds smart functions to your everyday life objects
  • Arduino DUE or ST Nucleo F401RE or Particle Photon. or UDOO. No matter which board you use, VIPER is multi-board compatible! You can find all the supported boards details in the dedicated section of the VIPER documentation:
  • If you not use Particle Photon (which has a wifi module onboard), you need an element that connects the board to the web, such as the wi-fi shield ofAdafruit. However you can use any other adapter that mounts the wifi chipCC3000 Texas Instruments (
  • a strip (or a ring) of NeoPixel LEDs from Adafruit (available here
  • glass or 3D printed lamp. The choice is yours.

Step 2: Assembling

Picture of Assembling

  1. Just piggyback the wifi Shield and the TOI Shield onto your Arduino (or ST Nucleo or UDOO). If you use Particle Photon just piggyback it onto the dedicated connectors on the TOI Shield.
  2. Connect the NeoPixel LEDs to the related port on the TOI Shield.
  3. Put all the boards and the LEDs into the Lamp.

Step 3: Programming

Picture of Programming

Using VIPER is very easy!

  1. connect and "viperize" your board (already explained here
  2. create a new project in VIPER (already explained here )
    Attention: you need to create 3 (+1) files:,, template.html (and
  3. copy the code presenting here
  4. upload the code on your board and you're done!

After turning on the lamp, this will automatically connect to the preset network.

Then just open the VIPER App, which will go in search of "viperized" objects connected to the network, select the object of interest, in this case the "VIPER Lamp", and you can interact with it! In this case the VIPER App shows a color picker and a menu for the selection of various pre-configured animations.

The code is very simple and has a lot of comments. For any questions or suggestions please feel free to post on the VIPER community forums:

Step 4: Make IoT brighter!

Picture of Make IoT brighter!

Did you like it? Let’s get hardcore!

The TOI Shield presents a set of sensors and actuators, including sensors for touch detection, infrared LED, microphone, light sensor and temperature sensor. You can start from this very simple example code to develop the behavior you prefer. Use the TOI Shield to extend the functionalities of the Lamp and #viperizeit!

Luigi F. Cerfeda (@L_F_Cerfeda) - VIPER team