Weather Lamp

NextPCB
3 min readNov 1, 2022

Weather Lamp is an RGB lamp made using Wiznet Pico WizFi360 and WS2812B leds. The lamp simulates the real-time weather using the openweathermap.org API. It read parameters like cloud intensity, temperature, and time and tries to mimic the cloud colours, sun/moon and change the base colour as temperature ranges.

Thank You NextPCB

This project is successfully completed because of the help and support from NextPCB. NextPCB is one of the most experienced PCB manufacturers in Global and has specialized in the PCB and assembly industry for over 15 years. Guys if you have a PCB project, please visit their website and get exciting discounts and coupons.

  1. Only 0$ for 5–10pcs PCB Prototypes: Nextpcb.com/pcbprototype

2. Register and get $100 from NextPCB: Nextpcb.com/coupon

Supplies

WizFi360-EVB-Pico

WS2812B LED Strip

3D Printer

White Filament

Solder Kit

Connecting Wire

To get high-quality electronic components at an extremely low cost, hqonline.com is the perfect site. They have labels from all the international brands, so you can find the best components for your device without spending a lot of money. This offers you the best value for your money.

Step 1: Designing & 3D Printing

  • I have designed the model in Fusion360.
  • Download the STL Files and 3D print them.

Step 2: Circuit Connection

Step 3: Assembly

Step 4: Getting OpenWeatherMap API Key

  • Go to openweathermap.org and create your account and verify it.
  • Now login to your account and click on you profile or right-top corner and go to My API Keys.
  • Copy the API Key that you see this will be used later in Step 6.

Step 5: Arduino Libraries Setup

https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

Step 6: Code Changes

/* Wi-Fi info */
char ssid[] = "SSID"; // your network SSID (name)
char pass[] = "PASWORD"; // your network password
  • At line 153 I have added 5 to an hour and 30(Indian time zone IST 5:30) to Minutes and applied maths to convert the APIs GMT time into ISt time zone.
  • You may have to change the number(5 and 30) according to your time zone.
h = (h + 5) % 24;
Serial.println(h);
minute = (m + 30) % 60;
// send the HTTP PUT request
client1.println(F("GET /data/2.5/weather?lat=17.6795&lon=77.6051&appid=43f22249d3d42ec***********ca809b HTTP/1.1"));

Step 7: Code Compile and Upload

  • Connect your device using a MicroUSB cable.
  • Select the board type and port from the tools.
  • Now click on upload code, and it will automatically compile and upload the code.
  • After the code is successfully uploaded the device will connect with provided wifi and show the output.

Note: I am using My PC USB as the power source for the Weather Lamp, you can use a 5V adapter or a 3.7V Lithium Ion battery.

Originally published at https://www.instructables.com.

--

--