mirror of
https://github.com/0x1d/esp8266-laser.git
synced 2025-12-16 02:38:47 +01:00
44 lines
1.2 KiB
Markdown
44 lines
1.2 KiB
Markdown
# Esp8266-Laser
|
|
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
|
|
/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/config.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 |