Raspberry Pi Weather Lamp

Andrew Evans
13 min readMar 9, 2021

Recently I had a fun idea for an IoT project where I could have a lamp tell me what the weather was doing. My basic premise was that the lamp would turn different colors based on conditions like Rain, Snow, Clouds, or Sun. There are many APIs that can give me forecast information freely, so I just needed to pull together a way to power the lamp and a way to change colors.

In this post, I’m going to walkthrough how I built a weather lamp with a Raspberry Pi and a 3D printed lamp. To run this lamp I’m using Python and you can see a full copy of all the source code I go over at my repo https://github.com/andrewevans0102/weather-lamp.

I also created a YouTube video that covers this same project. Check it out at the following:

Required Materials

To do this project, you only need some basic materials that you can get either directly off of Amazon or at your local hobby store. If you wanted to 3D print the lamp itself, that would require a 3D printer. However, you can find votive lamps and covers on Amazon that provide the same look and feel and could be used instead.

For the hardware part of the project:

  1. Raspberry Pi Zero W starter kit including power supply and SD card
  2. Bread Board
  3. LED lights and resistors
  4. Jumper Wires

If you have a 3D printer, you can use the STL and GCODE file that I’ve included in my GitHub repo in the “lamp-model” folder. The original file was found at Thingiverse here.

Some notes on the hardware:

  • There are a lot of places to get all of these things.
  • The CanaKit package I linked is great and I’ve used it for several projects. I highly recommend that.
  • The Bread Board, Resistors, Jumper Wires, and LED lights can be all bought together. I linked them individually just to show what you would need.
  • The reason we need a resistor is because they are necessary to control the power consumption from the Raspberry Pi. The Raspberry Pi itself…

--

--