DIY Long Distance Best Friend Lights




Introduction: DIY Long Distance Best Friend Lights

I made long distance synchronized lights known as "Best Friend" lamps. That just means that they are kept in sync to the current color of the other lamp. So if you were to change one lamp green, shortly after the other lamp would turn green. This is a very easy raspberry pi project that anyone can jump into and uses a lot of really basic concepts that are great to build upon.

This would be a great project to run during quarantine since you can't be close together all the time, and it can be used within the same home to signify if you are in a meeting or other important event.


  1. ws2811 LED Bulbs -
  2. Raspberry pi zero I used (can use any pi, remember to get an sd card) -
  3. Acrylic Sheet -
  4. Push Button
  5. Cherry wood, Red Oak wood - Local wood distributor

Step 1: Build the Base

To get started you'll need a box to put the electronic components in and feed the light through. I had some left over cherry wood and red oak wood that I used to make the box. I used a single square piece of cherry for the top, which ended up being about 4.5 inches x 4.5 inches and 1.25 inches thick. Then I used mitered pieces of red oak wood to add a section the electronic components will be in. Those pieces were about 4.5 inches long, 1 inch thick, and 2 inches wide. If I were to do this again, I would certainly make the red oak thinner so that the electronic components had more space to fit. After cutting the pieces I sanded them down and drilled a hole for the ws2811 led using a 1/2 inch drill bit. Then I finished them with Mahoney's walnut oil.

Step 2: Make the Diffusion Block

After the base was made I started to make the diffusion block which will be used to spread out the light from the ws2811 led. To do this I cut rectangular pieces out of acrylic and then sanded the acrylic to make it really blurry. This will allow the light from the led to spread out and illuminate more. I then used hot glue to secure the structure

Step 3: Solder Up the Circuit and Run the Code

This is the time to solder up the circuit. Each light has a raspberry pi zero, a ws2811 led, a push button, and a resistor. One circuit is used to control the ws2811 led, while the other is used to check for user input. The ws2811 led circuit is a simple one that uses the ground, 5v, and pwm pins of the raspberry pi to control the led. The user input circuit has a current limiting resistor and a push button that is used to switch the voltage on and off from a raspberry pi input pin.

Each pi is running the same program. This program checks when the push button is pressed, and if so, changes the color. It then sends a message to a web server that tracks the current color. Every 5 seconds this program also checks the current color from the web server and if that color is different than the current color of the lamp, it changes to that color. This is how they are kept in sync. So if you change the color to red on one lamp, that lamp will tell the web server that the current color is red, the other lamp will check the web server in 5 seconds and see that the current color is red and subsequently change to that color. The web server I used was hosted on one of the pis since I was using it within the same network, but you could easily run this server on any public server and the lamps would work across continents.

Given this design you could easily scale this to many more than 2 lamps.

Below are the two repos you'll need to run the project. If you have issues installing BiblioPixel you can take a look at my video on making a message board. It goes into installing BiblioPixel in detail.

Best Friend Light Program running on each pi:

Web Server that keeps track of the current color:

Step 4: Run the Program on Each Pi, Run the Server, and See It in Action!

Now you can run the program on the command line by checking the readme in the previous repos, run the server following the readme, and see it in action!

Be the First to Share


    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest
    • Micro:bit Contest

      Micro:bit Contest
    • Plastic Challenge

      Plastic Challenge



    Question 3 days ago on Introduction

    first of all congrats on the project it was a brilliant idea.
    I have a few questions about the running the server, which server do i have to connect it to ? a web one or should i host it on one of the rasberry pi card
    didnt want to bother you with "stupid question" but i'm learning everything about that and i'm a little bit in the blur right now.
    thanks in advance and thanks for all the videos you guys made


    10 months ago

    Nice Job! I have been working on a similar project with arduino. the basic principle is that the arduino sends 0s and 1s to an online google sheet and the other reads the data and sends new data to it.


    Reply 2 months ago

    Is there any way you can share the code with me? I am new to robotics and trying to figure out how to make this on a smaller budget


    Reply 10 months ago

    That's a really good workaround to having to host a server. Might consider modifying the code to handle this ;). That would also reduce the price tag since you wouldn't need a pi anymore

    Gabriel Cohn
    Gabriel Cohn

    Question 11 months ago

    Say I have 4 best friends. How complicated would it be to have a color per best friend? Say, best friend #1 pushes button and it's green, now the other 3 best friends can see green? Super cool thank you!


    Answer 11 months ago

    Super easy you just need to change the Best Friend code that’s run on each pi to be an array of 4 colors instead of 7 like I have set


    11 months ago

    Nice idea. Particularly good for quarantine.