started change to REST API

This commit is contained in:
fryakatkop
2017-10-25 01:10:32 +02:00
parent 19058ff256
commit 3f3409034c
2 changed files with 109 additions and 100 deletions

View File

@@ -4,12 +4,15 @@ Wifi Host for the Arduino-Laser-Spirograph
HTTP GET endpoints:
/motor/{motorNr}/{value}
/laser/{value}
/ssid/{ssidname}
/pwd/{password}
/apmode/1 -> SofAP (default), 0 -> client
/saveconf -> write wificonfig to file
/resetwifi -> reconnect wifi with the new settings
/readwifi -> returns wifi settings
/wificonfig -> GET returns wifi settings
POST sets new wifi settings
apMode=0: will try to connect to SSID first, 1: will directly start the AP
SSID=ssid
password=password
save=true will save config to spiffs
apply=true will reset wifi and try to connect with new param (buggy atm)
/readvalues -> return laser and motor values (all 0 at startup, ram only)
# Install
@@ -25,7 +28,7 @@ HTTP GET endpoints:
https://github.com/bblanchon/ArduinoJson/
- follow this instruction:
set wifi parameters in data/config.json before upload
set wifi parameters in data/wifi.json before upload
http://esp8266.github.io/Arduino/versions/2.0.0/doc/filesystem.html#uploading-files-to-file-system
You may also need to: