32 Commits
Author SHA1 Message Date
bartschdo76253 32266b5f37 Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 17:20:22 +02:00
schmidtsi76327 b62f4f9f95 changed gitignore 2021-06-23 17:16:16 +02:00
bartschdo76253 a8af7543ba deleted headers 2021-06-23 17:15:22 +02:00
schmidtsi76327 85f8da3476 reorganize 2021-06-23 17:12:44 +02:00
schmidtsi76327 f323bd4cf9 reorganize 2021-06-23 17:12:40 +02:00
Pupsmuckel 708bb2cda4 Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 17:01:53 +02:00
Pupsmuckel a4196bb579 Änderung 2021-06-23 17:01:47 +02:00
schmidtsi76327 908c4298be Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 17:01:34 +02:00
schmidtsi76327 6e885673b8 e 2021-06-23 17:01:08 +02:00
bartschdo76253 93cc958800 Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 16:57:11 +02:00
bartschdo76253 9d30423ca3 variable PWM step calculation 2021-06-23 16:51:15 +02:00
schmidtsi76327 b3b11d0818 reorder main, add ota.h 2021-06-23 16:49:53 +02:00
schmidtsi76327 51bdd6210e changed from include/http to data/ because of littlefs 2021-06-23 16:30:27 +02:00
Pupsmuckel d51bb4c95c Änderung html 2021-06-23 16:29:30 +02:00
schmidtsi76327 2659e366ec Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 16:20:45 +02:00
schmidtsi76327 4951ca46c1 delete unnecessary files 2021-06-23 16:19:31 +02:00
schmidtsi76327 97a6076864 delete unnecessary files 2021-06-23 16:18:54 +02:00
schmidtsi76327 ff6b82867c added httpserver with inheritance 2021-06-23 16:12:19 +02:00
Pupsmuckel a3dc7a5fba Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 16:09:58 +02:00
Pupsmuckel c13b0adc82 2te Änderung 2021-06-23 16:07:19 +02:00
schmidtsi76327 da20f74db8 „include/http/index.html“ ändern 2021-06-23 14:06:55 +00:00
Pupsmuckel d5b9827543 wichtige Änderung 2021-06-23 16:03:49 +02:00
Pupsmuckel 3c6889854e Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht 2021-06-23 15:58:48 +02:00
Pupsmuckel 8d8ffe4173 änderung an der website 2021-06-23 15:56:27 +02:00
schmidtsi76327 006404fccf ugly hack 2021-06-23 15:22:38 +02:00
schmidtsi76327 d17091651f Merge branch 'littlefs' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht into littlefs 2021-06-23 13:37:59 +02:00
schmidtsi76327 4b608c42ca tryin on win 2021-06-23 13:37:13 +02:00
Simon Schmidt 278f746b33 templ ini 2021-06-23 13:34:54 +02:00
Simon Schmidt 642ee7d0a6 gzip works from FS 2021-06-23 02:13:48 +02:00
Simon Schmidt 6596346d3d ls -l implement and ota fw fix 2021-06-23 01:30:28 +02:00
Simon Schmidt b696703d45 littefs working 2021-06-22 23:38:39 +02:00
Simon Schmidt baecaf02da cleanup 2021-06-22 20:36:53 +02:00
27 changed files with 1998 additions and 292 deletions

No files matched your search

+1
View File
@@ -1,5 +1,6 @@
.pio
.vscode
compress
platformio.ini
include/wifi_credentials.h
include/*.gz.h
+38 -1
View File
@@ -10,6 +10,43 @@
"vector": "cpp",
"string_view": "cpp",
"memory": "cpp",
"ranges": "cpp"
"ranges": "cpp",
"initializer_list": "cpp",
"utility": "cpp",
"atomic": "cpp",
"bit": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"concepts": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"map": "cpp",
"set": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"new": "cpp",
"ostream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
}
}
+63
View File
@@ -0,0 +1,63 @@
// filename: favicon.png.gz.h
#define favicon_png_gz_len 554
const char favicon_png_gz[] = {
<<<<<<< HEAD
0x1F, 0x8B, 0x08, 0x00, 0x3F, 0x4E, 0xD3, 0x60, 0x02, 0xFF,
=======
0x1F, 0x8B, 0x08, 0x00, 0x06, 0x4E, 0xD3, 0x60, 0x02, 0xFF,
>>>>>>> b62f4f9f95b7086fc97d9242705342fa1bebf0a9
0x01, 0x13, 0x02, 0xEC, 0xFD, 0x89, 0x50, 0x4E, 0x47, 0x0D,
0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44,
0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08,
0x06, 0x00, 0x00, 0x00, 0x1F, 0xF3, 0xFF, 0x61, 0x00, 0x00,
0x01, 0xDA, 0x49, 0x44, 0x41, 0x54, 0x38, 0x4F, 0x85, 0x93,
0x4F, 0x68, 0x13, 0x41, 0x14, 0x87, 0xBF, 0xB7, 0xD9, 0xFC,
0xB1, 0x0A, 0xD5, 0x56, 0x8A, 0x20, 0xA8, 0xA1, 0xBA, 0x49,
0x05, 0x7B, 0x89, 0x20, 0xEA, 0x41, 0x04, 0x8F, 0xE2, 0x55,
0x29, 0x78, 0xB3, 0x60, 0x0F, 0xA2, 0x07, 0x3D, 0x6E, 0x90,
0xA4, 0x37, 0x3D, 0xE9, 0x41, 0xD4, 0xB3, 0x07,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BD, 0x7C, 0x33, 0x37, 0xD5, 0x6A, 0xBB,
0xB3, 0x86, 0x48, 0x36, 0x7C, 0x88, 0x9E, 0xBF, 0xB4, 0xE6,
0x38, 0x33, 0x33, 0x97, 0x2F, 0xBE, 0x8A, 0x3E, 0xF3, 0xFF,
0x7E, 0x63, 0x4F, 0xF0, 0x69, 0x79, 0x79, 0x9F, 0xEB, 0xB8,
0xD3, 0x41, 0xC7, 0xD2, 0x5E, 0xF2, 0xE9, 0xE4, 0xE4, 0xE1,
0x9F, 0x51, 0x73, 0xB0, 0xFE, 0x03, 0xD7, 0x38, 0xAF, 0x11,
0x77, 0x41, 0x94, 0x64, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45,
0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82, 0xF3, 0x2E, 0x2C, 0x55,
0x13, 0x02, 0x00, 0x00};
+86
View File
@@ -0,0 +1,86 @@
// filename: index.html.gz.h
#define index_html_gz_len 407
const char index_html_gz[] = {
<<<<<<< HEAD
0x1F, 0x8B, 0x08, 0x00, 0x3F, 0x4E, 0xD3, 0x60, 0x02, 0xFF,
0xC5, 0x53, 0x3D, 0x4F, 0xC3, 0x30, 0x10, 0xDD, 0x91, 0xF8,
0x0F, 0x57, 0xEF, 0x69, 0x52, 0x86, 0x0A, 0x81, 0x93, 0x05,
0x2A, 0x31, 0x20, 0x51, 0x89, 0x2E, 0x4C, 0xC8, 0x49, 0x2E,
0xC9, 0x51, 0xC7, 0x8D, 0x6C, 0xF7, 0xF3, 0xD7, 0xE3, 0xDA,
0x09, 0xB4, 0xC0, 0x82, 0x84, 0x84, 0x17, 0xBF, 0xBB, 0x67,
0xBD, 0xE7, 0x73, 0x5E, 0xF8, 0xE8, 0xFE, 0xE9, 0x6E, 0xF1,
0x32, 0x9F, 0x41, 0x63, 0x5B, 0x99, 0x5D, 0x5E, 0xF0, 0x7E,
0x07, 0xE0, 0x0D, 0x8A, 0xD2, 0x23, 0x87, 0x2D, 0x59, 0x89,
0xD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 0x1C, 0xDF, 0xA0, 0x74, 0x25, 0xE6, 0x48,
0x8E, 0x12, 0x8F, 0x62, 0xC2, 0x0E, 0xC0, 0x48, 0x2A, 0x51,
0x7F, 0x5C, 0xED, 0x1B, 0x21, 0x72, 0x94, 0x40, 0x65, 0xC6,
0xBC, 0x7A, 0xEE, 0xDE, 0xDA, 0x9D, 0x28, 0xF7, 0x87, 0x9F,
0x7B, 0x52, 0xDD, 0xD2, 0xC6, 0xA6, 0x68, 0xA1, 0x6A, 0xE7,
0x31, 0x82, 0x2D, 0x1A, 0xAB, 0xB1, 0x96, 0x0E, 0x0E, 0x2D,
0xA9, 0x8C, 0x0D, 0xDD, 0x2A, 0x56, 0x7D, 0xD7, 0x87, 0xDB,
0x97, 0x46, 0x57, 0x7B, 0xEA, 0x60, 0x77, 0x90, 0x23, 0xC1,
0x64, 0xA9, 0xE6, 0x28, 0x9B, 0x1F, 0x9A, 0xAD, 0xD1, 0x55,
0x7B, 0x23, 0x55, 0x06, 0xF2, 0xEF, 0x1A, 0xCF, 0xF5, 0x41,
0x0D, 0xB8, 0x15, 0xCB, 0xEA, 0xCB, 0x7B, 0xFF, 0x8D, 0xF5,
0xFE, 0x6B, 0x24, 0x57, 0x2A, 0x79, 0xFA, 0xB3, 0xA6, 0xFD,
0xB8, 0xE0, 0x71, 0x5E, 0x38, 0x69, 0x0A, 0x4D, 0x9D, 0x05,
0xA3, 0x0B, 0x37, 0x80, 0x7C, 0xB1, 0xC1, 0x8B, 0x1B, 0x2F,
0x29, 0x0F, 0x81, 0x90, 0xC4, 0xFD, 0x14, 0x7D, 0x07, 0x40,
0x6E, 0x4D, 0x01, 0x5D, 0x05, 0x00, 0x00};
>>>>>>> b62f4f9f95b7086fc97d9242705342fa1bebf0a9
+28
View File
@@ -0,0 +1,28 @@
// filename: input.js.gz.h
#define input_js_gz_len 205
const char input_js_gz[] = {
<<<<<<< HEAD
0x1F, 0x8B, 0x08, 0x00, 0x3F, 0x4E, 0xD3, 0x60, 0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x6F, 0xDC, 0x22, 0x17, 0x62,
0x3D, 0x27, 0x29, 0x3C, 0xB4, 0x02, 0xF8, 0xB1, 0x59, 0x2A,
0xDB, 0xCE, 0x8B, 0xB5, 0x7A, 0xBE, 0x00, 0x11, 0xEE, 0x3B,
0x97, 0x36, 0x01, 0x00, 0x00};
File diff suppressed because it is too large. Load diff
+117
View File
@@ -0,0 +1,117 @@
// filename: style.css.gz.h
#define style_css_gz_len 1091
const char style_css_gz[] = {
<<<<<<< HEAD
0x1F, 0x8B, 0x08, 0x00, 0x3F, 0x4E, 0xD3, 0x60, 0x02, 0xFF,
=======
0x1F, 0x8B, 0x08, 0x00, 0x06, 0x4E, 0xD3, 0x60, 0x02, 0xFF,
>>>>>>> b62f4f9f95b7086fc97d9242705342fa1bebf0a9
0xBD, 0x56, 0x4D, 0x6F, 0xDB, 0x46, 0x10, 0xBD, 0x1B, 0xF0,
0x7F, 0x18, 0x24, 0x08, 0x60, 0xA5, 0xA2, 0x43, 0x29, 0xB2,
0xAD, 0xD0, 0xE8, 0xC1, 0x70, 0x93, 0xFA, 0xD0, 0x20, 0x40,
0xED, 0x43, 0x81, 0xA2, 0x87, 0x25, 0x39, 0x14, 0x17, 0x5E,
0x72, 0x89, 0xDD, 0xA5, 0x25, 0xD9, 0xF0, 0x7F, 0xEF, 0x7E,
0x91, 0x22, 0x29, 0xCA, 0x2A, 0x0A, 0xB4, 0x26, 0x60, 0x88,
0xBB, 0xF3, 0xF1, 0xDE, 0xCC, 0x9B, 0x91, 0x72, 0x55, 0x30,
0x78, 0x39, 0x3D, 0x01, 0xC8, 0x78, 0xA9, 0x02, 0x49, 0x9F,
0x31, 0x82, 0xD9, 0x65, 0xB5, 0xB9, 0x6E, 0xCF, 0x32, 0x52,
0x50, 0xB6, 0x8D, 0x40, 0x92, 0x52, 0x06, 0x12, 0x05, 0xCD,
0xA6, 0x70, 0x23, 0x28, 0x61, 0x53, 0xB8, 0x43, 0xF6, 0x84,
0x8A, 0x26, 0xC4,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 0xB1, 0x6B, 0x03, 0xBE, 0x32,
0x2C, 0xF4, 0xB2, 0x1F, 0x93, 0xB6, 0xDF, 0x7C, 0x5E, 0xDA,
0x58, 0xEE, 0x6B, 0xDB, 0xFF, 0x42, 0x82, 0xE6, 0x27, 0x92,
0x31, 0xBD, 0xB5, 0x67, 0x7D, 0x49, 0xBD, 0xEE, 0xD5, 0xD7,
0xF4, 0xC6, 0x9E, 0x74, 0x6B, 0xFB, 0xFF, 0x54, 0xE3, 0x3F,
0xA3, 0xF8, 0x37, 0xCB, 0x4E, 0x89, 0x3F, 0x02, 0x0D, 0x00,
0x00};
+2 -2
View File
@@ -28,8 +28,8 @@ def convert_to_gzip(src, out, f):
f_out.write(top.encode(encoding='utf-8'))
src='include/http/'
out='include/'
src='data/'
out='compress/'
for f in os.listdir(src):
convert_to_gzip(src, out, f)
File renamed without changes.
+56
View File
@@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<title>ESP8266 Treppenlicht</title>
<!-- main style sheet -->
<link href="/favicon.png" rel="icon" type="image/png" sizes="10x10">
<link href="/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="kopfzeile" style="text-align: center;">
<b>Treppenlicht</b>
</div>
<div class="ueberschrift">
<center>Helligkeit</center>
<div class="slider">
<label id="label_pwm">
</label>
<input type="range" class="testregler" min="0" max="100">
</div>
</div>
<div class="ueberschrift">
<center>Helligkeit bei Dunkelheit</center>
<div class="slider">
<label id="label_geschwindigkeit">
</label>
<input type="range" class="testregler" min="0" max="100">
</div>
</div>
<br>
<div class="ueberschrift">
<center>Laufgeschwindigkeit</center>
<div class="slider">
<label id="label_geschwindigkeit">
</label>
<input type="range" class="testregler" min="0" max="100">
</div>
</div>
<br>
<div class="ueberschrift">
<center>Licht-An-Zeit</center>
<div class="slider">
<label id="label_geschwindigkeit">
</label>
<input type="range" class="testregler" min="0" max="100">
</div>
</div>
</body>
<script src="/input.js"></script>
</html>
File renamed without changes.
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

+45 -16
View File
@@ -1,7 +1,7 @@
html {
font-size: 10px;
font-size: 16px;
font-family: sans-serif, Arial, Helvetica;
background-color: #b3b3b3;
background-color: #d4d4d4;
}
.topbar {
@@ -17,6 +17,45 @@ html {
padding: 1em;
}
.ueberschrift{
color: #ffffff;
font-size: 50px;
width: 40%;
background-color: #5f5f5f;
}
.testregler{
-webkit-appearance: none;
height: 30px;
width: 98%;
border-radius: 20px;
outline: black;
background-color: rgb(176, 188, 228);
}
.testregler::-webkit-slider-thumb{
-webkit-appearance: none;
appearance: none;
width: 5%;
height: 20px;
border-radius: 10px;
background-color: rgb(107, 122, 192);
cursor:pointer;
}
input[type=range]::-webkit-slider-thumb{
-webkit-appearance: none;
border:none;
height: 30px;
width: 4%;
border-radius: 30px;
}
.kopfzeile{
color: #1f1f1f;
font-size: 50px;
width: 100%;
background-color: #8d8a8a;
}
p, li {
font-size: 16px;
line-height: 2;
@@ -26,7 +65,7 @@ p, li {
body {
margin: 0 auto;
border: 1px solid black;
border: none;
border-radius: 3;
}
@@ -49,18 +88,10 @@ body {
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #ccc;
-webkit-transition: .4s;
transition: .4s;
width: 100%;
}
.slider:before {
/*.slider:before {
position: absolute;
content: "";
height: 26px;
@@ -70,7 +101,7 @@ body {
background-color: white;
-webkit-transition: .4s;
transition: .4s;
}
}*/
input:checked + .slider {
background-color: #04AA6D;
@@ -94,8 +125,6 @@ input:checked + .slider:before {
}
/* The slider itself */
.rangeslider {
-webkit-appearance: none; /* Override default CSS styles */
+39 -1
View File
@@ -22,4 +22,42 @@ GDB-Version aus Arduino Toolchain hat Support
```sh
$ ./start_xtensa_gdb_stub.sh
```
```
### __Achtung !__
Don`t forget __\r__
ESP-OTA wird von ufw oder Defender geblockt.
- Windows -> Python needs to be granted with rights
- Linux -> open udp port in ufw ->
```sh
platform.ini
upload_flags =
--host-port <PORT>
...
$ sudo ufw allow tcp/<PORT>
```
```c++
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
=====>
const String& p = SRH::_path;
if(p.endsWith(".gzip")) {
server.sendHeader("Content-Encoding", "gzip");
server.streamFile(f, mime::getContentType(p.substring(0, p.length()-5)), requestMethod);
}
else
server.streamFile(f, mime::getContentType(SRH::_path), requestMethod);
```
Webserver on v0.3.0 now working with LittleFS
TODO:
- check dir for files automatic
- move handleNotFound to httpserver.h
- maybe compress files ?
+16
View File
@@ -0,0 +1,16 @@
#ifndef __FILESYS_H
#define __FILESYS_H
#include <LittleFS.h>
bool mount_fs();
bool format_fs();
void ls(const char * dirname);
void readFile(const char * path);
void writeFile(const char * path, const char * message);
void appendFile(const char * path, const char * message);
void renameFile(const char * path1, const char * path2);
void deleteFile(const char * path);
#endif // __FILESYS_H
Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

-40
View File
@@ -1,40 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>ESP8266 Treppenlicht</title>
<!-- main style sheet -->
<link href="/favicon.png" rel="icon" type="image/png" sizes="16x16">
<link href="/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="topbar">
ESP8266 Treppenlicht Controller
</div>
<div class="control">
<div class="brightness">
</div>
<div class="onoff">
toggle all
<label id="l_onoff"></label>
<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
</div>
<div class="pwm">
<label id="label_pwm"></label>
<input type="range" min="1" max="100" value="50" class="rangeslider" id="range1">
</div>
<div class="timer">
<label id="label_timer"></label>
<input type="range" min="1" max="100" value="50" class="rangeslider" id="timer_range">
</div>
</div>
</body>
<script src="/input.js"></script>
</html>
+34 -23
View File
@@ -1,37 +1,48 @@
#ifndef __HTTPSERVER_H
#define __HTTPSERVER_H
#include "filesys.h"
#include <ESP8266WebServer.h>
class HTTPServer {
class HTTPServer : public ESP8266WebServer {
private:
int port;
ESP8266WebServer* server;
const char* rootDir;
bool addRootFileHandler();
bool formatFS() {
return format_fs();
}
void listRoot() {
ls(rootDir);
}
public:
HTTPServer(int port) {
server = new ESP8266WebServer;
// server->on("/", handleRootGz);
// server->on("/style.css", handleCssGz);
// server->on("/favicon.png", handleFaviconGz);
// server->onNotFound(handleNotFound);
server->begin(port);
}
~HTTPServer() {
server->stop();
delete server;
HTTPServer(const int _port, const char* _rootDir) :
ESP8266WebServer(_port), rootDir(_rootDir)
{ }
~HTTPServer()
{
Serial.printf("[HTTPServer] shut down ...\n\r");
}
void initialize() {
server->begin(port);
}
void handleClient() {
server->handleClient();
bool start() {
if(!mount_fs())
return false;
Serial.printf("[HTTPServer] LittleFS mounted !\n\r");
Serial.printf("[HTTPServer] root:\n\r");
this->listRoot();
Serial.printf("\n\r");
if( this->addRootFileHandler() ){
this->begin();
Serial.printf("[HTTPServer] Server active on Port 80 !\n\r");
return true;
}
Serial.printf("[HTTPServer] Not starting Server, something went wrong !\n\r");
return false;
}
};
#endif // __HTTPSERVER_H
+48
View File
@@ -0,0 +1,48 @@
#ifndef __OTA_H
#define __OTA_H
void ota_setup() {
ArduinoOTA.setPort(8266);
ArduinoOTA.setHostname("ESP_Treppenlicht");
ArduinoOTA.setPassword("admin");
// Password can be set with it's md5 value as well
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
// ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");
ArduinoOTA.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH) {
type = "sketch";
} else { // U_FS
type = "filesystem";
}
// NOTE: if updating FS this would be the place to unmount FS using FS.end()
Serial.println("Start updating " + type);
});
ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) {
Serial.println("Auth Failed");
} else if (error == OTA_BEGIN_ERROR) {
Serial.println("Begin Failed");
} else if (error == OTA_CONNECT_ERROR) {
Serial.println("Connect Failed");
} else if (error == OTA_RECEIVE_ERROR) {
Serial.println("Receive Failed");
} else if (error == OTA_END_ERROR) {
Serial.println("End Failed");
}
});
ArduinoOTA.begin();
}
#endif // __OTA_H
View File
Whitespace-only changes.
+130
View File
@@ -0,0 +1,130 @@
#include "filesys.h"
// listDir("/");
// deleteFile("/hello.txt");
// writeFile("/hello.txt", "Hello ");
// appendFile("/hello.txt", "World!\n\r");
// readFile("/hello.txt");
// listDir("/");
FSInfo fsinfo;
bool mount_fs() {
if(!LittleFS.begin()) {
Serial.println("[ERROR] LittleFS.info(), reset ...");
return false;
}
if(!LittleFS.info(fsinfo)) {
Serial.println("[ERROR] LittleFS.info(), reset ...");
return false;
}
printf("Filesystem opened:\n\r");
printf("\ttotalBytes:\t%d\n\r", fsinfo.totalBytes);
printf("\tusedBytes:\t%d\n\r", fsinfo.usedBytes);
printf("\tblockSize:\t%d\n\r", fsinfo.blockSize);
printf("\tpageSize:\t%d\n\r", fsinfo.pageSize);
printf("\tmaxOpenFiles:\t%d\n\r", fsinfo.maxOpenFiles);
printf("\tmaxPathLength:\t%d\n\r", fsinfo.maxPathLength);
printf("\n\r");
return true;
}
bool format_fs() {
printf("Formatting FS ! \n\r");
return LittleFS.format();
}
void ls(const char * dirname) {
Serial.printf("ls -l %s\n\r", dirname);
Dir root = LittleFS.openDir(dirname);
while (root.next()) {
File file = root.openFile("r");
time_t lw = file.getLastWrite();
struct tm * tmstruct = localtime(&lw);
Serial.printf("%8d %02d %02d %02d:%02d %s\n\r",
file.size(),
tmstruct->tm_mon + 1,
tmstruct->tm_mday,
tmstruct->tm_hour,
tmstruct->tm_min,
root.fileName().c_str());
file.close();
}
Serial.println();
}
void readFile(const char * path) {
Serial.printf("Reading file: %s\n\r", path);
File file = LittleFS.open(path, "r");
if (!file) {
Serial.println("Failed to open file for reading");
return;
}
Serial.print("Read from file: ");
while (file.available()) {
Serial.write(file.read());
}
file.close();
}
void writeFile(const char * path, const char * message) {
Serial.printf("Writing file: %s\n\r", path);
File file = LittleFS.open(path, "w");
if (!file) {
Serial.println("Failed to open file for writing");
return;
}
if (file.print(message)) {
Serial.println("File written");
} else {
Serial.println("Write failed");
}
delay(2000); // Make sure the CREATE and LASTWRITE times are different
file.close();
}
void appendFile(const char * path, const char * message) {
Serial.printf("Appending to file: %s\n\r", path);
File file = LittleFS.open(path, "a");
if (!file) {
Serial.println("Failed to open file for appending");
return;
}
if(file.print(message)) {
Serial.println("Message appended");
} else {
Serial.println("Append failed");
}
file.close();
}
void renameFile(const char * path1, const char * path2) {
Serial.printf("Renaming file %s to %s\n\r", path1, path2);
if (LittleFS.rename(path1, path2)) {
Serial.println("File renamed");
} else {
Serial.println("Rename failed");
}
}
void deleteFile(const char * path) {
Serial.printf("Deleting file: %s\n\r", path);
if (LittleFS.remove(path)) {
Serial.println("File deleted");
} else {
Serial.println("Delete failed");
}
}
+17
View File
@@ -0,0 +1,17 @@
#include "httpserver.h"
bool HTTPServer::addRootFileHandler() {
// //experimental, see doku.md
// server.serveStatic("/compressed", LittleFS, "/compressed.html.gzip");
this->serveStatic("", LittleFS, "/index.html");
this->serveStatic("/", LittleFS, "/index.html");
this->serveStatic("/#", LittleFS, "/index.html");
this->serveStatic("/style.css", LittleFS, "/style.css");
this->serveStatic("/input.js", LittleFS, "/input.js");
this->serveStatic("/favicon.png", LittleFS, "/favicon.png");
return true;
}
+119 -204
View File
@@ -1,176 +1,83 @@
#include <Arduino.h>
// debugging support via GDBStub over UART
#ifdef WITH_DEBUGGING_ON
#include <GDBStub.h>
#include <GDBStub.h> // debugging support via GDBStub over UART
#endif
#include "PCA9685.h"
extern "C" {
#include "user_interface.h"
extern "C" {
#include "user_interface.h"
}
// OTA & WEB
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include "ota.h"
#include "wifi_credentials.h"
#include "httpserver.h"
// BOARD
#define ESP12_LED 2
#define NODEMCU_LED 16
// PWM
os_timer_t timer1;
uint8_t timer_flag = 0;
PCA9685 pwmController;
os_timer_t Timer1; // Verwaltungsstruktur des Timers
void setup_pwm_pca9685();
int c;
bool toggle = false;
uint32_t m=0;
// WIFI
const char* ssid = STASSID;
const char* password = STAPSK;
// PWM
uint32_t dimmtimer = 0;
uint16_t time_per_stair = 500; // global parameter: dimmtime per stair [ms]
uint8_t direction = 1;
uint8_t onoff = 1;
void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor);
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval, uint8_t factor);
void ledsequence(uint8_t direction, uint8_t onoff);
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval);
void timerCallback(void *pArg)
{
*((int *) pArg) += 1;
ledsequence(direction, onoff, 4);
ledsequence(direction, onoff);
// Serial.print("[");
// Serial.print(micros()-m);
// Serial.print("] timerCallback\n");
// m = micros();
}
// OTA & WEB
#include "wifi_credentials.h"
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
#include <ESP8266WebServer.h>
#include <WiFiClient.h>
#include "index.html.gz.h"
#include "style.css.gz.h"
#include "favicon.png.gz.h"
// images are possible
// maybe check out FS <- SPIFFS
const char* ssid = STASSID;
const char* password = STAPSK;
void setup_webserver();
void setup_ota();
void setup_pwm_pca9685();
void handleRootGz();
void handleCssGz();
// HTTP
void handleNotFound();
HTTPServer httpServer(80, "/");
const int led = 13;
ESP8266WebServer server(80);
PCA9685 pwmController;
uint32_t _t=0;
#define SP_US(_str,_a) Serial.print(_str); Serial.print(" took: "); Serial.print(_a); Serial.println("us")
#define TIMEIF_US(_f, _l, _str) _t=micros(); _f; _t=micros()-_t; if(_t > _l) { SP_US(_str, _t); }
// ===============================================
void handleRootGz() {
const char* dataType = "text/html";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(200, dataType, (const char*)index_html_gz, index_html_gz_len);
}
void handleCssGz() {
const char* dataType = "text/css";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
}
void handleFaviconGz() {
const char* dataType = "image/png";
server.sendHeader(F("Content-Encoding"), F("gzip"));
server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
}
void handleNotFound() {
digitalWrite(led, 1);
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += httpServer.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? "GET" : "POST";
message += (httpServer.method() == HTTP_GET) ? "GET" : "POST";
message += "\nArguments: ";
message += server.args();
message += httpServer.args();
message += "\n";
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
for (uint8_t i = 0; i < httpServer.args(); i++) {
message += " " + httpServer.argName(i) + ": " + httpServer.arg(i) + "\n";
}
server.send(404, "text/plain", message);
digitalWrite(led, 0);
}
void setup_webserver() {
pinMode(led, OUTPUT);
digitalWrite(led, 0);
Serial.println("");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
server.on("/", handleRootGz);
server.on("/style.css", handleCssGz);
server.on("/favicon.png", handleFaviconGz);
server.onNotFound(handleNotFound);
server.begin();
Serial.println("HTTP server started");
}
void setup_ota() {
ArduinoOTA.setPort(8266);
ArduinoOTA.setHostname("ESP_Treppenlicht");
ArduinoOTA.setPassword("admin");
// Password can be set with it's md5 value as well
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
// ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");
ArduinoOTA.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH) {
type = "sketch";
} else { // U_FS
type = "filesystem";
}
// NOTE: if updating FS this would be the place to unmount FS using FS.end()
Serial.println("Start updating " + type);
});
ArduinoOTA.onEnd([]() {
Serial.println("\nEnd");
});
ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) {
Serial.printf("Progress: %u%%\r", (progress / (total / 100)));
});
ArduinoOTA.onError([](ota_error_t error) {
Serial.printf("Error[%u]: ", error);
if (error == OTA_AUTH_ERROR) {
Serial.println("Auth Failed");
} else if (error == OTA_BEGIN_ERROR) {
Serial.println("Begin Failed");
} else if (error == OTA_CONNECT_ERROR) {
Serial.println("Connect Failed");
} else if (error == OTA_RECEIVE_ERROR) {
Serial.println("Receive Failed");
} else if (error == OTA_END_ERROR) {
Serial.println("End Failed");
}
});
ArduinoOTA.begin();
httpServer.send(404, "text/plain", message);
}
void setup_pwm_pca9685() {
@@ -182,96 +89,67 @@ void setup_pwm_pca9685() {
Serial.println(pwmController.getChannelPWM(0)); // Should output 2048, which is 128 << 4
}
void setup() {
#ifdef WITH_DEBUGGING_ON
Serial.begin(460800);
gdbstub_init();
#else
Serial.begin(115200);
#endif
Serial.println(F("Booting ...."));
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval){
pinMode(NODEMCU_LED, OUTPUT);
pinMode(ESP12_LED, OUTPUT);
/*
softstart task
Wire.begin(); // Wire must be started first
Wire.setClock(400000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz
- get's called at regular intervals (1ms at the moment)
- dimms single led (0 - 15, PCA9685 outputs) with linear intervals vom startval to stopval
- calculates pwm steps depending on startval, stopval and timeinterval
- -> results in constanst speed
- returns 1 if led dimming is running
- returns 0 if led dimming is finished
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
*/
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}
os_timer_setfn(&Timer1, timerCallback, &c);
os_timer_arm(&Timer1, 1, true);
Serial.println("Ready");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
setup_ota();
setup_webserver();
setup_pwm_pca9685();
}
uint32_t t;
#define SP_US(_str,_a) Serial.print(_str); Serial.print(" took: "); Serial.print(_a); Serial.println("µs")
#define TIMEIF_US(_str,_f, _l) t=micros(); _f; t=micros()-t; if(t > _l) { SP_US(_str, t); }
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval, uint8_t factor){
static uint8_t lastled = 255;
static uint8_t current_pwm = 0;
static float current_pwm = 0;
static float stepsize = 1.0;
if(led != lastled){
pwmController.setChannelPWM(led, startval);
pwmController.setChannelPWM(led, (uint16_t)startval);
lastled = led;
current_pwm = startval;
stepsize = 20*abs(stopval - startval)/(float)time_per_stair; // only valid at 1ms function call interval
return 1;
}
if(current_pwm == stopval){
return 0;
}
else if(startval > stopval){
current_pwm -= 1;
if(current_pwm > stopval - stepsize && current_pwm < stopval + stepsize) return 0;
// todo: duty cycle zero!
if(startval > stopval){
current_pwm -= stepsize;
}
else {
current_pwm += 1;
current_pwm += stepsize;
}
pwmController.setChannelPWM(led, current_pwm*factor);
Serial.println((uint16_t)current_pwm);
pwmController.setChannelPWM(led, (uint16_t)current_pwm);
return 1;
}
#define LEDCOUNT 16
void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor){
void ledsequence(uint8_t direction, uint8_t onoff){
static int8_t led = 0;
static uint8_t brightness = 0;
static uint8_t lastbrightness = 0;
static uint16_t brightness = 0;
static uint16_t lastbrightness = 0;
static uint8_t finish = 1;
static uint32_t status = 0;
uint32_t status_build = 0;
status_build |= direction << 16;
status_build |= onoff << 8;
status_build |= factor;
static uint16_t status = 0;
uint16_t status_build = 0;
status_build |= direction << 8;
status_build |= onoff;
if(status_build != status){ // check if any parameter changed
finish = 0; // set state unfinished -> start action
if(direction) led = 0; // reset led counter depending of direction
else led = LEDCOUNT-1;
if(onoff){
brightness = 127; // set brightness value depending of on/off
lastbrightness = 0;
brightness = 2048; // set brightness value depending of on/off
lastbrightness = 200;
}
else{
brightness = 0;
lastbrightness = 127;
brightness = 200;
lastbrightness = 2048;
}
status = status_build; // set parameter memory
Serial.print("----Status Changed! onoff: ");
@@ -281,8 +159,8 @@ void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor){
}
if(!finish){ // finish == 0 -> action pending
if(!softstart_led(led,lastbrightness, brightness, factor)){
Serial.print("one LED finished, new set led: ");
if(!softstart_led(led,lastbrightness, brightness)){
Serial.print("one LED finished: ");
Serial.print(led);
Serial.print(" last: ");
Serial.print(lastbrightness);
@@ -307,19 +185,56 @@ void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor){
}
void setup() {
#ifdef WITH_DEBUGGING_ON
Serial.begin(460800);
gdbstub_init();
#else
Serial.begin(115200);
#endif
Serial.println(F("Booting ...."));
pinMode(NODEMCU_LED, OUTPUT);
pinMode(ESP12_LED, OUTPUT);
Wire.begin(); // Wire must be started first
Wire.setClock(1000000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
Serial.println("Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
ota_setup();
httpServer.start();
httpServer.onNotFound(handleNotFound);
Serial.println("HTTP server started !");
setup_pwm_pca9685();
Serial.println("PCA9685 connected !");
os_timer_setfn(&timer1, timerCallback, &timer_flag);
os_timer_arm(&timer1, 20, true);
}
void loop() {
if(millis() - dimmtimer > 2){
//ledsequence(direction, onoff, 4);
dimmtimer = millis();
}
if(millis() > 25000 && onoff == 1 && direction == 1) onoff = 0;
if(millis() > 35000 && direction == 1){
if(millis() > 45000 && direction == 1){
onoff = 1;
direction = 0;
direction = 0;
}
TIMEIF_US("OTA", ArduinoOTA.handle(), 1000);
TIMEIF_US("HTTP", server.handleClient(), 1000);
TIMEIF_US(ArduinoOTA.handle(), 1000, "OTA");
TIMEIF_US(httpServer.handleClient(), 1000, "HTTP");
}
View File
Whitespace-only changes.
+9 -3
View File
@@ -12,23 +12,29 @@
platform = espressif8266
board = nodemcuv2
framework = arduino
; for http files
board_build.filesystem = littlefs
board_build.ldscript = eagle.flash.4m1m.ld
extra_scripts = pre:create_gz_files.py
monitor_speed = 115200
extra_scripts = pre:extra_script.py
[env:serial]
upload_protocol = esptool
upload_speed = 921600
[env:ota]
; stuff for OTA
; https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update
; OTA => https://docs.platformio.org/en/latest/platforms/espressif8266.html#over-the-air-ota-update
upload_protocol = espota
upload_port = <!! IP ADDRESS !!>
upload_flags =
--port=8266
--host_port=<!! PORT !!>
--auth=admin
[env:debug]
; look at doku.md
build_flags = -DWITH_DEBUGGING_ON -Os -g3 -ggdb3
upload_protocol = esptool
upload_speed = 921600
+1 -1
View File
@@ -1,2 +1,2 @@
CD .\include\http
CD .\data
py.exe -m http.server
+1 -1
View File
@@ -1,2 +1,2 @@
cd include/http
cd data
python3 -m http.server