Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ESP32 Async Webserver API with SSD1306

NotificationsYou must be signed in to change notification settings

MR-Addict/esp32-async-webserver-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

1. Libraries

You can find all of them inlibraries folder.

#include<Adafruit_GFX.h>#include<Adafruit_SSD1306.h>#include<AsyncTCP.h>#include<ESPAsyncWebServer.h>#include<ArduinoJson.h>

2. API

EndpointMethodDescription
/apiGETGet sensor status and name
/apiPUTSet sensor name

3. Examples

Curl

# get status and namecurl esp32-ip-address/api# update namecurl -X PUT esp32-ip-address/api -d"name=01"

Fetch

// get datafunctionhandleClick(){fetch("http://esp32-ip-address/api").then((res)=>res.json()).then((res)=>console.log(res));}// put datafunctionhandleSubmit(event){event.preventDefault();constdata=newFormData();data.append("name":"01");fetch("http://esp32-ip-address/api",{method:"PUT",body:data}).then((res)=>res.json()).then((res)=>console.log(res));}

4. Demo Video

demo.mp4

About

ESP32 Async Webserver API with SSD1306

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp