Some examples done for the XIAO ESP32C3 board. They are inspired from other examples, but enhanced a bit to match a certain purpose.
This example shows a basic way how to make a REST API with a WiFi connected XIAO ESP32C3 board. Check it out!
REST example with a library. Get it! You need to install the following libraries using the Library Manager (Tools > Manage Libraries).
- AsyncTCP
- ESPAsyncTCP
- ESPAsyncWebSrv
WARNING! There is a bug in the ESPAsyncWebSrv library. Follow steps below to fix it.
- Navigate to your Arduino libraries folder, usually something like
Documents/Arduino/libraries
. Ask internet if can't find. - The
ESPAsyncWebSrv
folder should be there. Go in there and find fileAsyncWebSocket.cpp
. - Change the line 832 from
return IPAddress(0U);
toreturn IPAddress(static_cast<uint32_t>(0U));
. - Save the file and proceed with your Arduino project.
This example contains a HTML page that uses jQuery and Bootstrap libraries to interact with the REST API covered in WiFi REST Lib example.
Currently untested ChatGPT generated example how to use the ArduinoJson library with AsyncWebSrv.