tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
599 stars 188 forks source link

wifinina: add support for http server #480

Closed scottfeldman closed 1 year ago

scottfeldman commented 1 year ago

This adds http.ListenAndServe() implementation for wifinina. Included is an example webserver, basically copied from the rtl8720dn/webserver.

Tested on Arduino Nano RP2040 Connect. Also tried testing on Arduino Nano33 IoT but test panics with "out of memory". There's only 32K of SRAM on the Nano33, vs 264K on the rp2040 Connect.

sago35 commented 1 year ago

I will check this weekend.

deadprogram commented 1 year ago

Thank you for the addition @scottfeldman and to @sago35 for review. Now going to squash/merge.

fangyygw commented 1 year ago

out of memory in Arduino-Nano33-iot

scottfeldman commented 1 year ago

@fangyygw Yes, arduino-nano33 doesn't have enough SRAM (32KB) to support http server. Alternate boards that can use wifinina for http server are: nano-rp2040, pyportal, metro-m4-airlift, and matrixportal-m4.