Skip to content

Weather Prediction Electric Cushion

Raspberry pi Pico + W5100S / Chat GPT + Web Crawling

Alan

Published July 07, 2023

Weather Prediction Electric Cushion

Components

Hardware components
Software Apps and online services

Project description

Story

My butt was always cold.What if AI always sets my butt to the right temperature.I'll be able to concentrate on my work without having to wear it on my butt.

Hardware

W5100S PoE
W5100S PoE
 
The main board is the Raspberry Pi Pico. I used the W5100S PoE board that we worked on for Ethernet communication. The PoE board can receive up to 10 W of power.
Weather Prediction Electric Cushion, Story
I used FET to send 10W of output to resistance. It's not a big power, so I brought a nearby FET and used it. As you can see, we also have damping resistance.
Weather Prediction Electric Cushion, Story
First of all, we tested by connecting 4 20 ohm resistors in parallel.When I printed out 5W, I found that the resistance was very hot.
Weather Prediction Electric Cushion, Story
Now it's the sitting mat's turn. At first, I was going to repair the cushion and put resistance in it. But the cushion didn't give up his belly so easily.
Weather Prediction Electric Cushion, Story
Eventually, I put the resistance on the chair, and I put the cushion on it.

Firmware

 

The basics are as shown in the project below.

In this project, you only need to get the expected weather information through Web Crawling.

The firmware was taken from the project above.

Web Crawling

GPT does not currently support real-time data services. So I decided to read it on Naver as WebCrawling.It started implementing in a Python environment that is relatively light and easy to implement.

from bs4 import BeautifulSoup
def getweather() :
    html = requests.get('http://search.naver.com/search.naver?query=수내+날씨')
    soup = BeautifulSoup(html.text, 'html.parser')
    global weather
    weather = ''

    address = "Bundang Sunae"
    weather += address + '*'

    weather_data = soup.find('div', {'class': 'weather_info'})

    # Current Temperature
    temperature = (str(weather_data.find('div', {'class': 'temperature_text'}).text.strip()[5:])[:-1])
    weather += temperature + '*'

    # Weather Status
    weatherStatus = weather_data.find('span', {'class': 'weather before_slash'}).text

    if weatherStatus == '맑음':
        weatherPrint = 'Sunny'
    elif '흐림':
        weatherPrint = 'Cloud'

    weather += weatherPrint

WebCrawling can be done simply with a package called BeautifulSoup.

Weather Prediction Electric Cushion, Web Crawling
<Screen that appears when searching for weather in the water on the Naver site>

Let me deal with Crawling briefly.

Weather Prediction Electric Cushion, Web Crawling
In the script, temperature was read from temperature_text.
Weather Prediction Electric Cushion, Web Crawling
And weather was read in the span class of weather before_slash.
Weather Prediction Electric Cushion, Web Crawling
I want to read it in English, but I couldn't find it, so I just hardcoded it...And when you run this, it will look like the following.
Weather Prediction Electric Cushion, Web Crawling
It outputs temperature and weather like this.
 
Operating
Weather Prediction Electric Cushion, Web Crawling
The temperature does not rise under very hot temperatures.
Weather Prediction Electric Cushion, Web Crawling
Moderate spring weather? The temperature goes up a little bit. Actually, I think it'll be hot if it goes up to here. I need to fix it!
Weather Prediction Electric Cushion, Web Crawling
I set it to very cold weather. The temperature rises to 65.7 degrees. My butt will be warm!
Weather Prediction Electric Cushion, Web Crawling
It's getting colder... The picture explains the weather outside. It looks so cold!
Weather Prediction Electric Cushion, Web Crawling
There's a problem! Even if it gets colder, it should be moderately hot! If it snows a lot, my butt will burn!

Review

Weather Prediction Electric Cushion, Review
I'm using it well, but our company has a heater... If it's cold outside and the office is hot, there's a problem..

 

For the burning butt

Thanks

Comments

Similar projects you might like

Comments