-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69e8cd6
commit 06165d4
Showing
8 changed files
with
53 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
# how to develop web ui | ||
# how to develop | ||
|
||
## copy files except config.html to static/ | ||
## arduino code | ||
|
||
``` | ||
cd embed | ||
rsync -v --exclude=config.html ./* static | ||
``` | ||
1. git clone | ||
2. open directory in VSCode | ||
3. Fix includePath | ||
|
||
## run python http.server or some simple web server on embed | ||
### include path | ||
|
||
Edit `.vscode/c_cpp_properties.json` file. | ||
|
||
``` | ||
cd embed | ||
python -m http.server | ||
"includePath": [ | ||
"${workspaceFolder}/**", | ||
"/Users/username/.platformio/packages/**" <-- Add this. path vary on your OS. | ||
], | ||
``` | ||
|
||
## Access web via web browser | ||
## Web UI code | ||
|
||
Use firefox or chrome newer version. | ||
1. git clone | ||
2. edit `src/global.cpp` `DEBUG_BUILD = true`. by change this, envboy returns CORS header. | ||
3. Upload to board | ||
4. exec `python -m http.server` In `embed` directory | ||
5. access `localhost:8000` using web browser | ||
|
||
# after development | ||
### NOTE | ||
|
||
Dont forget to write back all files in static/ to embed. | ||
1. you cant use external JS libraries. because host has no internet access while in setup mode. | ||
|
||
``` | ||
cd embed/static | ||
cp -v ./* ../ | ||
``` | ||
NOTE: modernize JS/Web development is a task in near future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters