https://gist.github.com/Hermann-SW/e945 ... c679f48b03
(description of Pico to ESP01 connection in 1st gist comment)
Today I tried to use it to let Pico do HTTPS GET request aginst the internet.
It turned out that in current Pico MicroPython the UART read buffer is limited to 32 bytes.
I asked in Micropython forum in a related thread, and @robert-hh already had done a pull request to fix that:
https://forum.micropython.org/viewtopic ... 283#p56283
I just cloned his rp2_uart_buffer branch and built and flashed Micropython with uart buffer fix this way:
Code: Select all
cd ~/pico mkdir robert-hh cd robert-hh git clone -b rp2_uart_buffered https://github.com/robert-hh/micropython.git cd micropython git submodule update --init -- lib/pico-sdk lib/tinyusb make -C mpy-cross -j4 cd ports/rp2 time make -j4 flash build/firmware.uf2
And it works!
The response size of first URL I tested was bigger than 256 bytes default rxbuf.
So I created a bigger one with "uart=UART(0, 115200, rxbuf=512)".
As you can see the Pico can access my personal website on the internet easily.
In case you do not have a ESP01 module, you can buy together with USB programmer for less than 2$.
Have fun with Pico internet access.