2017-11-03 05:17:52 +00:00
2017-11-03 00:24:47 +00:00
2017-11-03 05:17:52 +00:00
2017-11-03 05:17:52 +00:00
2017-10-29 12:04:30 +01:00
2017-10-30 20:24:46 +01:00
foo
2017-10-31 19:48:15 +01:00
2017-10-29 12:04:30 +01:00
2015-11-16 00:19:18 +01:00
ui
2017-11-02 22:22:38 +00:00
2017-10-29 12:04:30 +01:00
ui
2017-11-02 22:22:38 +00:00

Esp8266-Laser

Wifi Host for the Arduino-Laser-Spirograph

HTTP endpoints:

  • /spirograph

    • GET returns laser and motor values (0 at startup)
    • POST sets new value(s)
      • laser=1-128 (1:permanent, 2-127 pulse, 128 off)
      • motor1=1-128
      • motor2=1-128
      • motor3=1-128
  • /preset

    • POST sets new value(s) to Preset
      • nr=presetNr (1-128)
      • laser=1-128 (1:permanent, 2-127 pulse, 128 off)
      • motor1=1-128
      • motor2=1-128
      • motor3=1-128
      • apply=true -> run preset
  • /presetMode

    • GET returns current mode
    • POST sets mode 0: presetsOff 1: cycle (not completed feature)
  • /presets

    • GET returns /presets.json
  • /wificonfig

    • GET returns wifi settings
    • POST sets new wifi setting{s}
      • 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, false will only change RAM variable (useful for onetime ap joins)
      • apply=true will reset wifi and try to connect with new param (buggy atm)
  • /heap

    • GET returns free heap of the ESP8266
  • /files

    • GET returns list of files

Install

You may also need to:

Development

PlatformIO


The project is intended to run on PlatformIO and the build environment is configured for NodeMCU 1.0 (ESP-12E Module).
More informations: http://docs.platformio.org/en/latest/platforms/espressif8266.html

Following libraries need to be installed via PIO Home / Libraries:

  • SoftwareSerial
  • ArduinoJson

Use following commands to build and upload the firmware and filesystem:

# clean the build directory  
pio run -t clean  

# run default build job  / build the formware
pio run  

# upload the firmware  
pio run -e nodemcu -t upload  

# build the filesystem  
pio run -t buildfs  

# upload the filesystem  
pio run -t uploadfs  

PlatformIO tasks can also be triggered with following npm run commands (pio / platformio executable needs to be in $PATH):

build:fs
upload:fs
build:firmware
upload:firmware

Frontend


Frontend development requires NodeJS / npm.
The development server watches all files in the frontend directory and automatically builds and copies the frontend code to the data folder.

### install dependencies
npm install

### run development server on port 8080
npm run dev  
  
### build distribution source to data folder  
npm run build  
Description
No description provided
Readme LGPL-2.1 188 KiB
Languages
JavaScript 31%
C++ 30.7%
HTML 16.6%
Less 12.1%
CSS 9.6%