This project use raspi PICO and ESP8266 as hardware and use [RT-Thread MicroPython - Visual Studio Marketplace](https://marketplace.visualstudio.com/it ... icropython) to develop the software to get weather by http request.
Embedded Software Configuration
Use RT-Thread Studio
- install the SDK of RP2040-RASPBERRYPI-PICO
- Create RT-Thread Project,select based on Development board--->RP2040-RASPBERRYPI-PICO
- Open RT-Thread Settings on your project,and add micropython, AT-Device packages
- Configure micropython
Enable usocket and ujson, and turn up Heap size appropriately
- Configure AT_Device
Enable ESP8266,and enable samples,input your SSID and password,then set the device name as "uart1"
Enable components--->network--->AT commands
Enable components--->Device Driver--->Using WiFi Framework
- Connect esp8266 to uart1 of Raspi pico
build the project and download it to the Raspi
clone rt-thread code Enter the bsp directory
- cd rt-thread/bsp/raspberry-pico
- scons --menuconfig
- pkgs --update
- scons
- Create RT-Thread MicroPython Project
- define request: def request(uri, method, para=None):
- decode the uri to domain, port and path.
- create the socket connection using usocket
- send http request.
- receive response
- parse the response to class HttpResponse and return it.
- Call `request()` to get the weather.
- API interface: https://yiketianqi.com/index/doc?version=day
https://github.com/cndabai/raspipicodemo