fastled 1.0.15__tar.gz → 1.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/build_multi_docker_image.yml +0 -5
- {fastled-1.0.15 → fastled-1.1.0}/.gitignore +0 -1
- fastled-1.1.0/PKG-INFO +113 -0
- fastled-1.1.0/README.md +94 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/SdCard/SdCard.ino +24 -17
- {fastled-1.0.15 → fastled-1.1.0}/examples/wasm/wasm.ino +9 -7
- {fastled-1.0.15 → fastled-1.1.0}/pyproject.toml +54 -58
- {fastled-1.0.15 → fastled-1.1.0}/setup.py +0 -1
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/app.py +82 -160
- fastled-1.1.0/src/fastled/check_cpp_syntax.py +34 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/compile_server.py +207 -221
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/docker_manager.py +7 -11
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/filewatcher.py +146 -196
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/open_browser.py +1 -5
- fastled-1.1.0/src/fastled/web_compile.py +173 -0
- fastled-1.1.0/src/fastled.egg-info/PKG-INFO +113 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/SOURCES.txt +1 -8
- {fastled-1.0.15 → fastled-1.1.0}/test +1 -1
- {fastled-1.0.15 → fastled-1.1.0}/tests/test_compile_server.py +1 -1
- fastled-1.1.0/tests/test_filechanger.py +51 -0
- {fastled-1.0.15 → fastled-1.1.0}/tests/test_webcompile.py +1 -1
- fastled-1.0.15/PKG-INFO +0 -196
- fastled-1.0.15/README.md +0 -177
- fastled-1.0.15/examples/SdCard/screenmap.json.h +0 -4
- fastled-1.0.15/src/fastled/__init__.py +0 -3
- fastled-1.0.15/src/fastled/keyboard.py +0 -91
- fastled-1.0.15/src/fastled/sketch.py +0 -55
- fastled-1.0.15/src/fastled/util.py +0 -10
- fastled-1.0.15/src/fastled/web_compile.py +0 -291
- fastled-1.0.15/src/fastled.egg-info/PKG-INFO +0 -196
- fastled-1.0.15/tests/test_embedded_data.py +0 -65
- fastled-1.0.15/tests/test_filechanger.py +0 -54
- fastled-1.0.15/tests/test_ino/wasm/wasm.ino +0 -134
- fastled-1.0.15/tests/test_server_and_client_seperatly.py +0 -42
- {fastled-1.0.15 → fastled-1.1.0}/.aiderignore +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/lint.yml +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_macos.yml +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_ubuntu.yml +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.github/workflows/test_win.yml +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.pylintrc +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.vscode/launch.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.vscode/settings.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/.vscode/tasks.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/LICENSE +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/MANIFEST.in +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/clean +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/docs/fastled.js +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/docs/fastled.wasm +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/docs/index.css +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/docs/index.html +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/docs/index.js +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Blink/Blink.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/Chromancer.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/detail.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/gary_woos_wled_ledmap.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/presets.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gary_woos_wled_port/presets.min.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/gen.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/mapping.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/net.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/output.json +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/ripple.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Chromancer/screenmap.json.h +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/ColorPalette/ColorPalette.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/ColorTemperature/ColorTemperature.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Cylon/Cylon.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/DemoReel100/DemoReel100.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Esp32Rmt51/Esp32Rmt51.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/EspI2SDemo/EspI2SDemo.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Fire2012/Fire2012.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Fire2012WithPalette/Fire2012WithPalette.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/FirstLight/FirstLight.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/FxEngine/FxEngine.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Noise/Noise.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/NoisePlayground/NoisePlayground.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/NoisePlusPalette/NoisePlusPalette.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/OctoWS2811/OctoWS2811.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Pacifica/Pacifica.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Pride2015/Pride2015.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/TwinkleFox/TwinkleFox.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Video/Gfx2Video/Gfx2Video.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/WasmScreenCoords/WasmScreenCoords.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/Water/Water.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/examples/XYMatrix/XYMatrix.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/install +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/lint +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/requirements.testing.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/setup.cfg +0 -0
- /fastled-1.0.15/tests/test_ino/embedded/data/bigdata.dat → /fastled-1.1.0/src/fastled/__init__.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/assets/example.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/build_mode.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/cli.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled/paths.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/dependency_links.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/entry_points.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/requires.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/src/fastled.egg-info/top_level.txt +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/tests/test_bad_ino.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/tests/test_cli.py +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/tests/test_ino/bad/bad.ino +0 -0
- {fastled-1.0.15/tests/test_ino/embedded → fastled-1.1.0/tests/test_ino/wasm}/wasm.ino +0 -0
- {fastled-1.0.15 → fastled-1.1.0}/upload_package.sh +0 -0
fastled-1.1.0/PKG-INFO
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: fastled
|
3
|
+
Version: 1.1.0
|
4
|
+
Summary: FastLED Wasm Compiler
|
5
|
+
Home-page: https://github.com/zackees/fastled-wasm
|
6
|
+
Maintainer: Zachary Vorhies
|
7
|
+
License: BSD 3-Clause License
|
8
|
+
Keywords: template-python-cmd
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
10
|
+
Requires-Python: >=3.7
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: docker
|
14
|
+
Requires-Dist: httpx
|
15
|
+
Requires-Dist: watchdog
|
16
|
+
Requires-Dist: livereload
|
17
|
+
Requires-Dist: download
|
18
|
+
Requires-Dist: filelock
|
19
|
+
|
20
|
+
# FastLED wasm compiler
|
21
|
+
|
22
|
+
Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
|
23
|
+
|
24
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
|
25
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
|
26
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
|
27
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
|
28
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
# About
|
33
|
+
|
34
|
+
This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
|
35
|
+
|
36
|
+
Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.
|
37
|
+
|
38
|
+
This works on Windows/Linux/Mac(arm/x64).
|
39
|
+
|
40
|
+
Docker is required.
|
41
|
+
|
42
|
+
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
|
43
|
+
|
44
|
+
# Demo
|
45
|
+
|
46
|
+
https://zackees.github.io/fastled-wasm/
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
# Install
|
51
|
+
|
52
|
+
```bash
|
53
|
+
pip install fastled-wasm
|
54
|
+
```
|
55
|
+
|
56
|
+
**Note that you may need to install x86 docker emulation on Mac-m1 and later, as this is an x86 only image at the prsent.**
|
57
|
+
|
58
|
+
# Use
|
59
|
+
|
60
|
+
Change to the directory where the sketch lives and run
|
61
|
+
|
62
|
+
```bash
|
63
|
+
cd <SKETCH-DIRECTORY>
|
64
|
+
fastled-wasm
|
65
|
+
```
|
66
|
+
|
67
|
+
Or if you don't have docker then use our web compiler
|
68
|
+
|
69
|
+
```bash
|
70
|
+
cd <SKETCH-DIRECTORY>
|
71
|
+
fastled-wasm --web
|
72
|
+
```
|
73
|
+
|
74
|
+
After compilation a web browser windows will pop up.
|
75
|
+
|
76
|
+
# Hot reload by default
|
77
|
+
|
78
|
+
Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
|
79
|
+
|
80
|
+
This style of development should be familiar to those doing web development.
|
81
|
+
|
82
|
+
# Data
|
83
|
+
|
84
|
+
If you want to embed data, then do so in the `data/` directory at the project root. The files will appear in the `data/` director of any spawned FileSystem or SDCard.
|
85
|
+
|
86
|
+
|
87
|
+
### About the compilation.
|
88
|
+
|
89
|
+
Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will
|
90
|
+
provide shims for most of the common api points.
|
91
|
+
|
92
|
+
|
93
|
+
# Revisions
|
94
|
+
|
95
|
+
* 1.1.0 - Use `fastled` as the command for the wasm compiler.
|
96
|
+
* 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
|
97
|
+
* 1.0.16 - `fastled-wasm` package name has been changed to `fled`
|
98
|
+
* 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
|
99
|
+
* 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
|
100
|
+
* 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
|
101
|
+
* 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
|
102
|
+
* 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
|
103
|
+
* 1.0.10 - Watching files is now available for `--web`
|
104
|
+
* 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
|
105
|
+
* 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
|
106
|
+
* 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
|
107
|
+
* 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
|
108
|
+
* 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
|
109
|
+
* 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
|
110
|
+
* 1.0.3 - Integrated `live-server` to launch when available.
|
111
|
+
* 1.0.2 - Small bug with new installs.
|
112
|
+
* 1.0.1 - Re-use is no longer the default, due to problems.
|
113
|
+
* 1.0.0 - Initial release.
|
fastled-1.1.0/README.md
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# FastLED wasm compiler
|
2
|
+
|
3
|
+
Compiles an Arduino/Platformio sketch into a wasm binary that can be run directly in the web browser.
|
4
|
+
|
5
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/lint.yml)
|
6
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/build_multi_docker_image.yml)
|
7
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_macos.yml)
|
8
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_ubuntu.yml)
|
9
|
+
[](https://github.com/zackees/fastled-wasm/actions/workflows/test_win.yml)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
# About
|
14
|
+
|
15
|
+
This python app will compile your FastLED style sketches into html/js/wasm output that runs directly in the browser.
|
16
|
+
|
17
|
+
Compile times are extremely fast - I've seen as low as 5 seconds but 8-15 seconds is typical.
|
18
|
+
|
19
|
+
This works on Windows/Linux/Mac(arm/x64).
|
20
|
+
|
21
|
+
Docker is required.
|
22
|
+
|
23
|
+
https://github.com/user-attachments/assets/64ae0e6c-5f8b-4830-ab87-dcc25bc61218
|
24
|
+
|
25
|
+
# Demo
|
26
|
+
|
27
|
+
https://zackees.github.io/fastled-wasm/
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
# Install
|
32
|
+
|
33
|
+
```bash
|
34
|
+
pip install fastled-wasm
|
35
|
+
```
|
36
|
+
|
37
|
+
**Note that you may need to install x86 docker emulation on Mac-m1 and later, as this is an x86 only image at the prsent.**
|
38
|
+
|
39
|
+
# Use
|
40
|
+
|
41
|
+
Change to the directory where the sketch lives and run
|
42
|
+
|
43
|
+
```bash
|
44
|
+
cd <SKETCH-DIRECTORY>
|
45
|
+
fastled-wasm
|
46
|
+
```
|
47
|
+
|
48
|
+
Or if you don't have docker then use our web compiler
|
49
|
+
|
50
|
+
```bash
|
51
|
+
cd <SKETCH-DIRECTORY>
|
52
|
+
fastled-wasm --web
|
53
|
+
```
|
54
|
+
|
55
|
+
After compilation a web browser windows will pop up.
|
56
|
+
|
57
|
+
# Hot reload by default
|
58
|
+
|
59
|
+
Once launched, the compiler will remain open, listening to changes and recompiling as necessary and hot-reloading the sketch into the current browser.
|
60
|
+
|
61
|
+
This style of development should be familiar to those doing web development.
|
62
|
+
|
63
|
+
# Data
|
64
|
+
|
65
|
+
If you want to embed data, then do so in the `data/` directory at the project root. The files will appear in the `data/` director of any spawned FileSystem or SDCard.
|
66
|
+
|
67
|
+
|
68
|
+
### About the compilation.
|
69
|
+
|
70
|
+
Pre-processing is done to your source files. A fake Arduino.h will be inserted into your source files that will
|
71
|
+
provide shims for most of the common api points.
|
72
|
+
|
73
|
+
|
74
|
+
# Revisions
|
75
|
+
|
76
|
+
* 1.1.0 - Use `fastled` as the command for the wasm compiler.
|
77
|
+
* 1.0.17 - Pulls updates when necessary. Removed dependency on keyring.
|
78
|
+
* 1.0.16 - `fastled-wasm` package name has been changed to `fled`
|
79
|
+
* 1.0.15 - `fled` is an alias of `fastled-wasm` and will eventually replace it. `--web-host` was folded into `--web`, which if unspecified will attempt to run a local docker server and fallback to the cloud server if that fails. Specifying `--web` with no arguments will default to the cloud server while an argument (like `localhost`) will cause it to bind to that already running server for compilation.
|
80
|
+
* 1.0.14 - For non significant changes (comments, whitespace) in C++/ino/*.h files, compilation is skipped. This significantly reduces load on the server and prevents unnecessary local client browser refreshes.
|
81
|
+
* 1.0.13 - Increase speed of local compiles by running the server version of the compiler so it can keep it's cache and not have to pay docker startup costs because now it's a persistant server until exit.
|
82
|
+
* 1.0.12 - Added suppport for compile modes. Pass in `--release`, `--quick`, `--debug` for different compile options. We also support `--profile` to profile the build process.
|
83
|
+
* 1.0.11 - `--web` compile will automatically be enabled if the local build using docker fails.
|
84
|
+
* 1.0.10 - Watching files is now available for `--web`
|
85
|
+
* 1.0.9 - Enabled web compile. Access it with `--web` or `--web-host`
|
86
|
+
* 1.0.8 - Allow more than one fastled-wasm browser instances to co-exist by searching for unused ports after 8081.
|
87
|
+
* 1.0.7 - Docker multi image build implemented, tool now points to new docker image compile.
|
88
|
+
* 1.0.6 - Removed `--no-open` and `--watch`, `--watch` is now assumed unless `--just-compile` is used.
|
89
|
+
* 1.0.5 - Implemented `--update` to update the compiler image from the docker registry.
|
90
|
+
* 1.0.4 - Implemented `--watch` which will watch for changes and then re-launch the compilation step.
|
91
|
+
* 1.0.3 - Integrated `live-server` to launch when available.
|
92
|
+
* 1.0.2 - Small bug with new installs.
|
93
|
+
* 1.0.1 - Re-use is no longer the default, due to problems.
|
94
|
+
* 1.0.0 - Initial release.
|
@@ -21,12 +21,8 @@ void loop() {
|
|
21
21
|
#include "fx/video.h"
|
22
22
|
#include "file_system.h"
|
23
23
|
#include "ui.h"
|
24
|
-
#include "screenmap.h"
|
25
|
-
#include "file_system.h"
|
26
|
-
|
27
|
-
|
28
|
-
#include "screenmap.json.h" // const char JSON_SCREEN_MAP[] = { ... }
|
29
24
|
|
25
|
+
#include "file_system.h"
|
30
26
|
|
31
27
|
#define LED_PIN 2
|
32
28
|
#define LED_TYPE WS2811
|
@@ -42,13 +38,8 @@ void loop() {
|
|
42
38
|
#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
|
43
39
|
#define IS_SERPINTINE true
|
44
40
|
|
45
|
-
|
46
|
-
Title title("SDCard Demo - Mapped Video");
|
47
|
-
Description description("Video data is streamed off of a SD card and displayed on a LED strip. The video data is mapped to the LED strip using a ScreenMap.");
|
48
|
-
|
49
|
-
|
50
41
|
CRGB leds[NUM_LEDS];
|
51
|
-
|
42
|
+
XYMap xyMap(MATRIX_WIDTH, MATRIX_HEIGHT, IS_SERPINTINE); // No serpentine
|
52
43
|
|
53
44
|
FileSystem filesystem;
|
54
45
|
Video video;
|
@@ -60,14 +51,9 @@ void setup() {
|
|
60
51
|
if (!filesystem.beginSd(CHIP_SELECT_PIN)) {
|
61
52
|
Serial.println("Failed to initialize file system.");
|
62
53
|
}
|
63
|
-
// JSON_SCREEN_MAP
|
64
|
-
FixedMap<Str, ScreenMap, 16> screenMaps;
|
65
|
-
ScreenMap::ParseJson(JSON_SCREEN_MAP, &screenMaps);
|
66
|
-
ScreenMap screenMap = screenMaps["strip1"];
|
67
|
-
|
68
54
|
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS)
|
69
55
|
.setCorrection(TypicalLEDStrip)
|
70
|
-
.setScreenMap(
|
56
|
+
.setScreenMap(xyMap);
|
71
57
|
FastLED.setBrightness(96);
|
72
58
|
//fxEngine.addFx(animartrix);
|
73
59
|
video = filesystem.openVideo("data/video.dat", NUM_LEDS, FPS);
|
@@ -78,7 +64,28 @@ void setup() {
|
|
78
64
|
|
79
65
|
void loop() {
|
80
66
|
uint32_t now = millis();
|
67
|
+
|
68
|
+
// fxEngine.draw(millis(), leds);
|
81
69
|
video.draw(now, leds);
|
70
|
+
|
71
|
+
EVERY_N_SECONDS(1){
|
72
|
+
Serial.println("Drawing");
|
73
|
+
for (int i = 0; i < NUM_LEDS;) {
|
74
|
+
int nleft = MIN(8, NUM_LEDS - i);
|
75
|
+
for (int j = 0; j < nleft; j++) {
|
76
|
+
CRGB c = leds[i + j];
|
77
|
+
Serial.print("(");
|
78
|
+
Serial.print(c.r);
|
79
|
+
Serial.print(", ");
|
80
|
+
Serial.print(c.g);
|
81
|
+
Serial.print(", ");
|
82
|
+
Serial.print(c.b);
|
83
|
+
Serial.print(") ");
|
84
|
+
}
|
85
|
+
Serial.println();
|
86
|
+
i += nleft;
|
87
|
+
}
|
88
|
+
}
|
82
89
|
FastLED.show();
|
83
90
|
}
|
84
91
|
|
@@ -14,8 +14,9 @@
|
|
14
14
|
#include "fx/fx_engine.h"
|
15
15
|
|
16
16
|
#include "fx/2d/animartrix.hpp"
|
17
|
-
#include "
|
17
|
+
#include "platforms/wasm/js.h"
|
18
18
|
|
19
|
+
#include "ui.h"
|
19
20
|
|
20
21
|
#define LED_PIN 3
|
21
22
|
#define BRIGHTNESS 96
|
@@ -68,9 +69,6 @@ CRGB leds[NUM_LEDS];
|
|
68
69
|
XYMap xyMap = XYMap::constructRectangularGrid(MATRIX_WIDTH, MATRIX_HEIGHT);
|
69
70
|
NoisePalette noisePalette = NoisePalette(xyMap);
|
70
71
|
|
71
|
-
Title title("FastLED Wasm Demo");
|
72
|
-
Description description("This example combines two features of FastLED to produce a remarkable range of effects from a relatively small amount of code. This example combines FastLED's color palette lookup functions with FastLED's Perlin noise generator, and the combination is extremely powerful.");
|
73
|
-
|
74
72
|
Slider brightness("Brightness", 255, 0, 255);
|
75
73
|
Checkbox isOff("Off", false);
|
76
74
|
Slider speed("Noise - Speed", 15, 1, 50);
|
@@ -79,13 +77,12 @@ Slider changePalletTime("Noise - Time until next random Palette", 5, 1, 100);
|
|
79
77
|
Slider scale( "Noise - Scale", 20, 1, 100);
|
80
78
|
Button changePalette("Noise - Next Palette");
|
81
79
|
Button changeFx("Switch between Noise & Animartrix");
|
82
|
-
NumberField fxIndex("Animartrix -
|
80
|
+
NumberField fxIndex("Animartrix - index", 0, 0, NUM_ANIMATIONS);
|
81
|
+
|
83
82
|
|
84
83
|
Animartrix animartrix(xyMap, POLAR_WAVES);
|
85
84
|
FxEngine fxEngine(NUM_LEDS);
|
86
85
|
|
87
|
-
|
88
|
-
|
89
86
|
void setup() {
|
90
87
|
FastLED.addLeds<WS2811, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS)
|
91
88
|
.setCorrection(TypicalLEDStrip)
|
@@ -122,6 +119,11 @@ void loop() {
|
|
122
119
|
animartrix.fxSet(fxIndex);
|
123
120
|
}
|
124
121
|
|
122
|
+
EVERY_N_MILLISECONDS(1000) {
|
123
|
+
printf("fastled running\r\n");
|
124
|
+
printf("Numberfield: %f\r\n", fxIndex.value());
|
125
|
+
}
|
126
|
+
|
125
127
|
|
126
128
|
fxEngine.draw(millis(), leds);
|
127
129
|
FastLED.show();
|
@@ -1,58 +1,54 @@
|
|
1
|
-
[build-system]
|
2
|
-
requires = ["setuptools>=65.5.1", "setuptools-scm", "wheel"]
|
3
|
-
build-backend = "setuptools.build_meta"
|
4
|
-
|
5
|
-
[project]
|
6
|
-
name = "fastled"
|
7
|
-
readme = "README.md"
|
8
|
-
description = "FastLED Wasm Compiler"
|
9
|
-
requires-python = ">=3.7"
|
10
|
-
keywords = ["template-python-cmd"]
|
11
|
-
license = { text = "BSD 3-Clause License" }
|
12
|
-
classifiers = ["Programming Language :: Python :: 3"]
|
13
|
-
dependencies = [
|
14
|
-
"docker",
|
15
|
-
"httpx",
|
16
|
-
"watchdog",
|
17
|
-
"livereload",
|
18
|
-
"download",
|
19
|
-
"filelock",
|
20
|
-
]
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
[
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
"
|
37
|
-
"
|
38
|
-
|
39
|
-
|
40
|
-
"
|
41
|
-
"
|
42
|
-
]
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
[
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
[project.scripts]
|
56
|
-
fastled-wasm = "fastled.cli:main"
|
57
|
-
fled = "fastled.cli:main"
|
58
|
-
fastled = "fastled.cli:main"
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=65.5.1", "setuptools-scm", "wheel"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "fastled"
|
7
|
+
readme = "README.md"
|
8
|
+
description = "FastLED Wasm Compiler"
|
9
|
+
requires-python = ">=3.7"
|
10
|
+
keywords = ["template-python-cmd"]
|
11
|
+
license = { text = "BSD 3-Clause License" }
|
12
|
+
classifiers = ["Programming Language :: Python :: 3"]
|
13
|
+
dependencies = [
|
14
|
+
"docker",
|
15
|
+
"httpx",
|
16
|
+
"watchdog",
|
17
|
+
"livereload",
|
18
|
+
"download",
|
19
|
+
"filelock",
|
20
|
+
]
|
21
|
+
# Change this with the version number bump.
|
22
|
+
version = "1.1.0"
|
23
|
+
|
24
|
+
[tool.setuptools]
|
25
|
+
package-dir = {"" = "src"}
|
26
|
+
|
27
|
+
[tool.ruff]
|
28
|
+
line-length = 200
|
29
|
+
|
30
|
+
[tool.pylint."MESSAGES CONTROL"]
|
31
|
+
good-names = [
|
32
|
+
"c",
|
33
|
+
"i",
|
34
|
+
"ok",
|
35
|
+
"id",
|
36
|
+
"e",
|
37
|
+
"f"
|
38
|
+
]
|
39
|
+
disable = [
|
40
|
+
"missing-function-docstring",
|
41
|
+
"missing-module-docstring"
|
42
|
+
]
|
43
|
+
|
44
|
+
[tool.isort]
|
45
|
+
profile = "black"
|
46
|
+
|
47
|
+
[tool.mypy]
|
48
|
+
ignore_missing_imports = true
|
49
|
+
disable_error_code = ["import-untyped"]
|
50
|
+
|
51
|
+
[project.scripts]
|
52
|
+
fastled-wasm = "fastled.cli:main"
|
53
|
+
fled = "fastled.cli:main"
|
54
|
+
fastled = "fastled.cli:main"
|