Smart String Lights

A visual virtual assistant that delivers information through LEDs, and processes audio and data locally so that your privacy is ensured.

Similar projects worth following
Smart String Lights is a visual virtual assistant that uses the PocketSphinx interface from Carnegie Mellon to locally interpret voice commands. Depending on keywords in the commands, the lights will check the internet for information and present it visually, turn on a pre-programmed animated lighting theme, or react to music. The visual display uses intuitive connections like yellow light to communicate sunny weather, warm tones for high temperatures, and blinking blue light for rain.

Our project uses individually addressable LED lights to communicate information, primarily visually telling us the weather, precipitation, temperature, and a 24 hour forecast. Through the raspberry pi, we were able to use python to control the lights effectively with a simple set up. Not only do our lights work with forecasts, but they can also react to music, creating a "dancing" effect by reacting to the pitch and beats in the music.

Image from iOS.MOV

Testing out the lights with some code- we were trying to achieve a flame effect.

quicktime - 14.43 MB - 05/29/2021 at 04:00


View all 6 components

  • Flowchart

    Sania06/14/2021 at 02:29 0 comments

    We added a flowchart to help give an overview of the whole project, more specifically the inputs and outputs. 

  • Getting wind speed

    Neha06/13/2021 at 17:15 0 comments

    One of the pieces of weather data we provide is the wind speed. Knowing the physical distance between adjacent LEDs, this command displays the current wind speed by moving lights across the string at the actual current speed of the wind. In addition, the hue of the lights is directly proportional to the wind speed.

  • Providing the weather on a string of lights

    Neha06/13/2021 at 17:04 0 comments

    One of the big components of our project is our display of weather data. Of course, however, weather data is fairly quantitative, and there isn't necessarily an obvious way to display that data on a string of 50 lights. Figuring out how to intuitively depict the weather in this medium turned out to be a fun challenge for everyone. We started by creating a general-purpose interface for accessing a user's current location, as well as for getting the information we needed from the weather API we were using. From there, each of us took on an aspect of the weather and got to work figuring out how to animate it. 

  • Added new code to communicate moon illumination

    Keerat Singh06/10/2021 at 03:07 0 comments

    Just completed integration for code that enables the device to answer questions regarding moon phase and illumination. Now, when you ask the device a question regarding moon or phase, the LEDs will light up with a new cycling gradient effect, and the proportion of lights that are lit up will correspond with the phase of the moon.

    Check out the code on our github!

  • Flame Effect

    Keerat Singh06/01/2021 at 17:30 0 comments

    One of the scripts we developed for the smart string lights creates a flame effect. You can see the code we used on our GitHub here. To ask the assistant to show this effect, simply say a command with the keyword "fire" and this effect will be displayed. You can see it in action in our demo video!

  • Making the Smart String Lights Accessible to non-tech users

    Keerat Singh06/01/2021 at 05:03 0 comments

    One of the main things that made our end product harder to use for not tech users was that the main script had to be started using the command line through virtual access to the Pi. We solved this issue by making the main script run automatically as soon as the Raspberry Pi starts, eliminating the need to run the command manually. This was accomplished using crontab, and we have added the necessary instructions.

View all 6 project logs

  • 1
    Set up Raspberry Pi for use (virtual access recommended)

    If your SD card does not come pre-loaded with Raspbian or Raspberry Pi OS, put it on your SD card using Raspberry Pi Imager

    Insert SD card into Raspberry Pi SD card slot, and connect mouse, keyboard, and monitor. Then plug in the power cable and follow the prompts on the screen.

    Once you are on the desktop, connect to your wifi and make note of the IP address which can be found by mousing over the wifi icon. Also go into the configuration setting and enable VNC connection. Now, you can access the PI through the software VNC Viewer on the computer of your choice, as long as both the computer and the Pi are on the same wifi network.

    For more detail and step by step instructions see the Youtube video linked here:

  • 2
    Set up the wiring for the lights
    1. Get your lights. They should come with the lights and a separate JST connector. We won’t be using the JST connector that comes with the lights. The wires are braided and are not ideal for a breadboard. 
    2. Connect three MM jumper wires directly into the 3-pin connector on one side of the lights. The middle wire is data, and the wire on the two sides are power and ground (figure out which is which by looking at the nearest LED, or referring to the separate JST connector, where red is power)
    3. Add your batteries to the battery pack. Keep the battery pack switched off for now. (The red wire is power, black wire is ground.)
    4. Wire up the breadboard according to the diagram below. This is from the official Adafruit wiring guide, and you can see the “Raspberry Pi Wiring with Level Shifting Chip” section for more details. 

    For a step by step walkthrough, see the video here starting at 6:15:

  • 3
    Install required software libraries and project code
    1. Clone the github repo with all the code for this project at 
      git clone

      Execute the above command in a terminal while in the intended destination folder (where you want the code for this project to be located).

    2. Verify that you have python 3 installed by running the following commands in a terminal. You should see that you have some version 3.6-3.8. 
    3. Again in a terminal, make sure that pip is updated (works for python 3.6 and 3.7, be sure to replace “python3.6” with the correct python version) 
      curl -O
      sudo python3.6
    4. We will follow these instructions for the rest of set up. The essential parts of the process have been highlighted below, but if something doesn’t work as expected, we recommend checking the link for additional context and recommendations.
    5. Run the following commands to install the Adafruit_Blinka library that provides the CircuitPython support in python
      sudo pip3 install rpi_ws281x adafruit-circuitpython-neopixel
      sudo python3 -m pip install --force-reinstall adafruit-blinka
    6. If you have completed the hardware setup steps above, you can now test your lights. Make sure your pi is up and running, and turn on the battery pack.
    7. Navigate (cd) to the lights_test folder in the WECEtechmusiclights directory. You should see a file called, which is an adapted version of Adafruit's test code. See the page linked in step 4 for the original code. 
    8. Run the test program using the following command. Use sudo to run all project code, as root access is required to access the pi peripherals. 

      sudo python3

      sudo python3 
    9. Your lights should start lighting up! Exit the program using Ctrl-C. 
    10. Feel free to explore the other lights programs in the same folder, the weather lights in the weather_lights folder, or code your own animations!

View all 7 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates