FeralAI / GP2040

Gamepad firmware for Raspberry Pi Pico and other RP2040 microcontrollers supporting Nintendo Switch, XInput and DirectInput
https://gp2040.info
MIT License
586 stars 125 forks source link

Feature/webserver #28

Closed FeralAI closed 3 years ago

FeralAI commented 3 years ago

Uses TinyUSB integrated web server (via lwIP lib) to host a configuration app in React. HTTP post wasn't working in lwIP, so the server communication is a bit hackey. Use GET requests to /cgi/action?method=[methodname] with key/value query params in this format: param1:value1|param2:value2. The webserver returns pseudo-JSON (axios parses it, so we gucci) which can be easily bound in the frontend.