---
title: "Weather Lamp"
url: "https://maker.wiznet.io/austin/projects/weather-lamp/"
markdown_url: "https://maker.wiznet.io/austin/projects/weather-lamp/md"
type: "UCC: User Created Content"
author: "mukesh-sankhla"
author_url: "https://www.electromaker.io/project/view/weather-lamp"
editor: "WIZnet"
editor_url: "https://maker.wiznet.io/"
original_author: "mukesh-sankhla"
original_url: "https://www.electromaker.io/project/view/weather-lamp"
published: "2023-09-04"
language: "en"
tags: ["Arduino", "WizFi360-EVB-Pico", "WS2812"]
hardware: ["WIZnet WizFi360-EVB-Pico", "Seeed Studio WS2812B Digital RGB LED Flexi-Strip 144 LED"]
likes: 0
views: 3309
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Weather Lamp

> Weather Lamp A IoT based 3D Printed Weather Simulating Lamp

Original author: mukesh-sankhla (source: https://www.electromaker.io/project/view/weather-lamp)

## Components

- **WIZnet WizFi360-EVB-Pico** x 1
- **Seeed Studio WS2812B Digital RGB LED Flexi-Strip 144 LED** x 1
- Software: **Arduino IDE** ([docs](https://www.arduino.cc/en/software))
- Software: **Autodesk Fusion 360** ([docs](https://www.autodesk.com/))

## Documents and links

- [WiznetWeatherLamp](https://github.com/MukeshSankhla/WiznetWeatherLamp) (code)

## Article

Weather Lamp is a RGB lamp made using [WizFi360-EVB-Pico](https://docs.wiznet.io/Product/Open-Source-Hardware/wizfi360-evb-pico) and WS2812B LED's. The lamp simulates the real-time weather using the openweathermap.org API. It read parameters like cloud intensity, temperature, time and try to mimic the cloud colors, sun/moon and change the base color as temperature range.

**# Step 1: Designing & 3D Printing**

① I have designed the model in Fusion360.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696417173%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696417178%2Epng)

② Download the STL files and 3D print them.

③ By clicking on the 3D model link you can view the model in your PC/mobile browser and the model can be edited in Fusion360 software.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696417205%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696417229%2Epng)

**# Step 2: Circuit Connection**

① Connect the WizFi360 and WS2812B LEDs as shown in circuit diagram.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418542%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418547%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418551%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418557%2Epng)

**# Step 3: Assembly**

① Assemble all the parts together using quick glue.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418653%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418658%2Epng)

**# Step 4: Getting Openweathermap API Key**

① Go to [openweathermap.org](https://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**.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418779%2Epng)

③ Copy the API key that you see this will be used later in Step 6.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696418803%2Epng)

**# Step 5: Arduino Libraries Setup**

① First go to **Files** → **Preferences** and copy & paste the following URL in **Additional Boards Manager URLs** :

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

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425411%2Epng)

② Go to **Tools** → **Boards** → **Boards Manager** and search for Raspberry Pi Pico/RP2040 and install it.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425424%2Epng)

③ Download the [WizFi360_arduino_library](https://github.com/Wiznet/WizFi360_arduino_library/tree/WizFi360-EVB-Pico), Go to **Sketch** → **Include Library** → **Add .Zip Library** and select the downloaded Zip file.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425435%2Epng)

④ Now got to **Sketch** → **Include Library** → **Manage Libraries** and Search for **ArduinoJson**, **Adafruit_NeoPixel** and install them.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425449%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425454%2Epng)

**# Step 6: Code Changes**

① Download the [Arduino code](https://github.com/MukeshSankhla/WiznetWeatherLamp) and make the followig changes.
② At line 20 you have to edit your Wi-Fi Name(SSID) and password.

```c
/* Wi-Fi info */
char ssid[] = "SSID";             // your network SSID (name)
char pass[] = "PASWORD"; // your network password
```

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425754%2Epng)

③ At line 153 I have added 5 to hour and 30(Indian time zone IST 5:30) to minutes and applied a maths to convert the APIs GMT time into IST time zone.

④ You may have to change the number(5 and 30) according to your tiem zone.

```c
h = (h + 5) % 24;
      Serial.println(h);
      minute = (m + 30) % 60;
```

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425782%2Epng)

⑤ At line 282 you have to enter your locations longitude, latitude and you accounts openweathermap API key.

```c
// 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"));
```

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425829%2Epng)

**# Step 7: Code Compile an Uplaod**

① Connect your device using micro USB cable.
② Select the board type and port from tools.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425917%2Epng)

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425929%2Epng)

③ Now click on uplaod code, it will automatically compile and uplaod the code.

![](https://maker.wiznet.io/upload/ckeditor5/480201039%5F1696425954%2Epng)

④ After code is succesfully uloaded the device will connect with provided Wi-Fi and show the output.

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

---

Source: https://maker.wiznet.io/austin/projects/weather-lamp/
