Files
esp8266-laser/README.md
2017-10-25 01:10:32 +02:00

47 lines
1.5 KiB
Markdown

# Esp8266-Laser
Wifi Host for the Arduino-Laser-Spirograph
HTTP GET endpoints:
/motor/{motorNr}/{value}
/laser/{value}
/saveconf -> write wificonfig to file
/resetwifi -> reconnect wifi with the new 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
- install arduino ide (1.8.5)
- follow this instruction
https://github.com/esp8266/Arduino#installing-with-boards-manager
- clone/exctract repo to sketchbook
- install this libaries
https://github.com/plerup/espsoftwareserial
https://github.com/bblanchon/ArduinoJson/
- follow this instruction:
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:
- get and install driver for nodemcu
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers
# Development
Frontend
--------
Frontend development requires NodeJS / NPM.
Run development server:
npm run dev
Build distribution source:
npm run build