Skip to content

Commit 510e347

Browse files
author
Lars Brandt
committed
v2.0.0
1 parent 7bf8f16 commit 510e347

File tree

23 files changed

+905
-217
lines changed

23 files changed

+905
-217
lines changed

calc-light-dimcurve/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

calc-light-dimcurve/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Test Artnet Sender
2+
3+
## Install
4+
5+
* Requires [NodeJs](https://nodejs.org/)
6+
* Run in this directory
7+
8+
npm install
9+
10+
## Execute
11+
12+
* Open
13+
14+
index.js
15+
and change the host to the IP or hostname of your node
16+
* Run
17+
18+
npm start

calc-light-dimcurve/index.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// https://www.mikrocontroller.net/articles/LED-Fading
2+
3+
const offset = 150;
4+
const pwmResoluteion = 4096;
5+
const steps = 256;
6+
7+
const y0 = calc(0, offset);
8+
const yn = calc(steps - 1, offset);
9+
10+
pwm();
11+
12+
function pwm() {
13+
console.log(`// steps: ${steps}, offset: ${offset}, pwmResolution: ${pwmResoluteion}`);
14+
console.log('const uint16_t pwmtable_16[256] PROGMEM = {');
15+
let line = '';
16+
const valuesPerLine = 16;
17+
count = 0;
18+
for (let i = 0; i < steps; ++i) {
19+
++count;
20+
const f = 1 - (i / steps);
21+
const y = calc(i, offset) - (y0 * f);
22+
line += y.toFixed()
23+
// line += i;
24+
if (i !== steps - 1) {
25+
line += ', '
26+
}
27+
if (count == valuesPerLine) {
28+
count = 0;
29+
console.log(line);
30+
line = '';
31+
}
32+
}
33+
if (line.length > 0) {
34+
console.log(line);
35+
}
36+
console.log('};');
37+
}
38+
39+
function calc(i, off) {
40+
const x = i + off;
41+
const last = steps + off;
42+
return Math.pow(2, Math.log2(pwmResoluteion - 1) * (x + 1) / (last));
43+
}

calc-light-dimcurve/package.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "calc-light-dimvalue",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"start": "nodemon index.js"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"nodemon": "^2.0.20"
13+
}
14+
}

calc-light-dimcurve/yarn.lock

Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
abbrev@1:
6+
version "1.1.1"
7+
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
8+
integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==
9+
10+
anymatch@~3.1.2:
11+
version "3.1.3"
12+
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
13+
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
14+
dependencies:
15+
normalize-path "^3.0.0"
16+
picomatch "^2.0.4"
17+
18+
balanced-match@^1.0.0:
19+
version "1.0.2"
20+
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
21+
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
22+
23+
binary-extensions@^2.0.0:
24+
version "2.2.0"
25+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
26+
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
27+
28+
brace-expansion@^1.1.7:
29+
version "1.1.11"
30+
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
31+
integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
32+
dependencies:
33+
balanced-match "^1.0.0"
34+
concat-map "0.0.1"
35+
36+
braces@~3.0.2:
37+
version "3.0.2"
38+
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
39+
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
40+
dependencies:
41+
fill-range "^7.0.1"
42+
43+
chokidar@^3.5.2:
44+
version "3.5.3"
45+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
46+
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
47+
dependencies:
48+
anymatch "~3.1.2"
49+
braces "~3.0.2"
50+
glob-parent "~5.1.2"
51+
is-binary-path "~2.1.0"
52+
is-glob "~4.0.1"
53+
normalize-path "~3.0.0"
54+
readdirp "~3.6.0"
55+
optionalDependencies:
56+
fsevents "~2.3.2"
57+
58+
59+
version "0.0.1"
60+
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
61+
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
62+
63+
debug@^3.2.7:
64+
version "3.2.7"
65+
resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a"
66+
integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==
67+
dependencies:
68+
ms "^2.1.1"
69+
70+
fill-range@^7.0.1:
71+
version "7.0.1"
72+
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
73+
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
74+
dependencies:
75+
to-regex-range "^5.0.1"
76+
77+
fsevents@~2.3.2:
78+
version "2.3.2"
79+
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
80+
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
81+
82+
glob-parent@~5.1.2:
83+
version "5.1.2"
84+
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
85+
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
86+
dependencies:
87+
is-glob "^4.0.1"
88+
89+
has-flag@^3.0.0:
90+
version "3.0.0"
91+
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
92+
integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
93+
94+
ignore-by-default@^1.0.1:
95+
version "1.0.1"
96+
resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
97+
integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==
98+
99+
is-binary-path@~2.1.0:
100+
version "2.1.0"
101+
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
102+
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
103+
dependencies:
104+
binary-extensions "^2.0.0"
105+
106+
is-extglob@^2.1.1:
107+
version "2.1.1"
108+
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
109+
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
110+
111+
is-glob@^4.0.1, is-glob@~4.0.1:
112+
version "4.0.3"
113+
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
114+
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
115+
dependencies:
116+
is-extglob "^2.1.1"
117+
118+
is-number@^7.0.0:
119+
version "7.0.0"
120+
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
121+
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
122+
123+
minimatch@^3.1.2:
124+
version "3.1.2"
125+
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
126+
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
127+
dependencies:
128+
brace-expansion "^1.1.7"
129+
130+
ms@^2.1.1:
131+
version "2.1.3"
132+
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2"
133+
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==
134+
135+
nodemon@^2.0.20:
136+
version "2.0.20"
137+
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.20.tgz#e3537de768a492e8d74da5c5813cb0c7486fc701"
138+
integrity sha512-Km2mWHKKY5GzRg6i1j5OxOHQtuvVsgskLfigG25yTtbyfRGn/GNvIbRyOf1PSCKJ2aT/58TiuUsuOU5UToVViw==
139+
dependencies:
140+
chokidar "^3.5.2"
141+
debug "^3.2.7"
142+
ignore-by-default "^1.0.1"
143+
minimatch "^3.1.2"
144+
pstree.remy "^1.1.8"
145+
semver "^5.7.1"
146+
simple-update-notifier "^1.0.7"
147+
supports-color "^5.5.0"
148+
touch "^3.1.0"
149+
undefsafe "^2.0.5"
150+
151+
nopt@~1.0.10:
152+
version "1.0.10"
153+
resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
154+
integrity sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==
155+
dependencies:
156+
abbrev "1"
157+
158+
normalize-path@^3.0.0, normalize-path@~3.0.0:
159+
version "3.0.0"
160+
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
161+
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
162+
163+
picomatch@^2.0.4, picomatch@^2.2.1:
164+
version "2.3.1"
165+
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
166+
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
167+
168+
pstree.remy@^1.1.8:
169+
version "1.1.8"
170+
resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.8.tgz#c242224f4a67c21f686839bbdb4ac282b8373d3a"
171+
integrity sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==
172+
173+
readdirp@~3.6.0:
174+
version "3.6.0"
175+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
176+
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
177+
dependencies:
178+
picomatch "^2.2.1"
179+
180+
semver@^5.7.1:
181+
version "5.7.1"
182+
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
183+
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
184+
185+
semver@~7.0.0:
186+
version "7.0.0"
187+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
188+
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
189+
190+
simple-update-notifier@^1.0.7:
191+
version "1.1.0"
192+
resolved "https://registry.yarnpkg.com/simple-update-notifier/-/simple-update-notifier-1.1.0.tgz#67694c121de354af592b347cdba798463ed49c82"
193+
integrity sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==
194+
dependencies:
195+
semver "~7.0.0"
196+
197+
supports-color@^5.5.0:
198+
version "5.5.0"
199+
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
200+
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
201+
dependencies:
202+
has-flag "^3.0.0"
203+
204+
to-regex-range@^5.0.1:
205+
version "5.0.1"
206+
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
207+
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
208+
dependencies:
209+
is-number "^7.0.0"
210+
211+
touch@^3.1.0:
212+
version "3.1.0"
213+
resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
214+
integrity sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==
215+
dependencies:
216+
nopt "~1.0.10"
217+
218+
undefsafe@^2.0.5:
219+
version "2.0.5"
220+
resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.5.tgz#38733b9327bdcd226db889fb723a6efd162e6e2c"
221+
integrity sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==

platformio.ini

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ default_envs = develop
1717

1818
[env:prod-flash]
1919
; change Host to your esp32 node
20-
upload_protocol = espota
21-
upload_port = 192.168.178.61
20+
#upload_protocol = espota
21+
#upload_port = 192.168.178.61
2222

2323
[env:develop]
2424
build_flags =
@@ -30,12 +30,13 @@ build_flags =
3030
;upload_port = 192.168.178.61
3131

3232
; change serial port to your port
33-
monitor_port = COM7
33+
#monitor_port = COM7
3434
monitor_speed = 115200
3535

3636
; change serial port to your port
37-
upload_port = COM7
37+
; upload_port = COM7
3838
upload_protocol = esptool
39+
upload_speed = 921600
3940

4041
; JTAG debug
4142
; change "adapter_khz 20000" to "adapter_khz 1000" in
@@ -63,21 +64,22 @@ board_build.embed_txtfiles =
6364
board_build.embed_files =
6465
; put other files here
6566
; ...
66-
; But don't touch the following block. It will be replaced by frontend gulp task.
67+
; Don't touch the following block. It will be replaced by the frontend gulp task.
6768
; <Autogenerated>
68-
src/webapp/app.css.gz
69-
src/webapp/app.js.gz
7069
src/webapp/appcache.manifest
70+
src/webapp/app.js.gz
71+
src/webapp/app.css.gz
7172
src/webapp/index.html.gz
7273
src/webapp/vendor.css.gz
7374
src/webapp/vendor.js.gz
7475
; </Autogenerated>
7576

7677
lib_deps =
77-
78-
79-
80-
81-
82-
83-
78+
forkineye/ESPAsyncE131@^1.0.4
79+
https://github.com/Hieromon/AutoConnect.git @1.4.1
80+
https://github.com/bblanchon/ArduinoJson.git @6.20.0
81+
https://github.com/FaBoPlatform/FaBoPWM-PCA9685-Library.git @1.0.0
82+
https://github.com/bakercp/CRC32.git @2.0.0
83+
https://github.com/Links2004/arduinoWebSockets.git @2.3.7
84+
knolleary/PubSubClient @^2.8
85+

0 commit comments

Comments
 (0)