Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update document
Browse files Browse the repository at this point in the history
yakumo-saki committed Jan 23, 2023
1 parent 69e8cd6 commit 8a911ef
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions _how-to-develop.md
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.

0 comments on commit 8a911ef

Please sign in to comment.