mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 05:26:52 +03:00
Update 2020-10-25
This commit is contained in:
@@ -27,7 +27,12 @@ A 3d-printable housing can be found here: https://www.thingiverse.com/thing:4571
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
##### Rolling - (2020-10-24)
|
##### Rolling - (2020-10-25)
|
||||||
|
|
||||||
|
* Update digital CNN to v6.5.0 (additional type of numbers trained)
|
||||||
|
* Update HTML to v1.1.0 - additional host information displayed (hostname, IP, ssid)
|
||||||
|
|
||||||
|
2020-10-24
|
||||||
|
|
||||||
* Bug-Fixing in case of automated restart
|
* Bug-Fixing in case of automated restart
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ static const char *MAIN_TAG = "connect_wlan";
|
|||||||
std::string ssid;
|
std::string ssid;
|
||||||
std::string passphrase;
|
std::string passphrase;
|
||||||
std::string hostname;
|
std::string hostname;
|
||||||
|
std::string ipaddress;
|
||||||
|
|
||||||
std::string std_hostname = "watermeter";
|
std::string std_hostname = "watermeter";
|
||||||
|
|
||||||
@@ -123,6 +124,7 @@ void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _ho
|
|||||||
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
||||||
tcpip_adapter_ip_info_t ip_info;
|
tcpip_adapter_ip_info_t ip_info;
|
||||||
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
||||||
|
ipaddress = std::string(ip4addr_ntoa(&ip_info.ip));
|
||||||
printf("IPv4 : %s\n", ip4addr_ntoa(&ip_info.ip));
|
printf("IPv4 : %s\n", ip4addr_ntoa(&ip_info.ip));
|
||||||
printf("HostName : %s\n", hostname.c_str());
|
printf("HostName : %s\n", hostname.c_str());
|
||||||
}
|
}
|
||||||
@@ -191,3 +193,14 @@ void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphra
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string getHostname(){
|
||||||
|
return hostname;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getIPAddress(){
|
||||||
|
return ipaddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string getSSID(){
|
||||||
|
return ssid;
|
||||||
|
}
|
||||||
|
|||||||
@@ -10,4 +10,8 @@ void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _ho
|
|||||||
|
|
||||||
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase, std::string &_hostname);
|
void LoadWlanFromFile(std::string fn, std::string &_ssid, std::string &_passphrase, std::string &_hostname);
|
||||||
|
|
||||||
|
std::string getHostname();
|
||||||
|
std::string getIPAddress();
|
||||||
|
std::string getSSID();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -402,8 +402,11 @@ void task_reboot(void *pvParameter)
|
|||||||
|
|
||||||
void doReboot(){
|
void doReboot(){
|
||||||
LogFile.WriteToFile("Reboot - now");
|
LogFile.WriteToFile("Reboot - now");
|
||||||
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
|
||||||
KillTFliteTasks();
|
KillTFliteTasks();
|
||||||
|
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
|
||||||
|
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||||
|
esp_restart();
|
||||||
|
hard_restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
#include "time_sntp.h"
|
#include "time_sntp.h"
|
||||||
|
|
||||||
|
#include "connect_wlan.h"
|
||||||
|
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include "esp_wifi.h"
|
#include "esp_wifi.h"
|
||||||
@@ -94,6 +96,34 @@ esp_err_t info_get_handler(httpd_req_t *req)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_task.compare("Hostname") == 0)
|
||||||
|
{
|
||||||
|
std::string zw;
|
||||||
|
zw = std::string(getHostname());
|
||||||
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_task.compare("IP") == 0)
|
||||||
|
{
|
||||||
|
std::string zw;
|
||||||
|
zw = std::string(getIPAddress());
|
||||||
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_task.compare("SSID") == 0)
|
||||||
|
{
|
||||||
|
std::string zw;
|
||||||
|
zw = std::string(getSSID());
|
||||||
|
httpd_resp_sendstr_chunk(req, zw.c_str());
|
||||||
|
httpd_resp_sendstr_chunk(req, NULL);
|
||||||
|
return ESP_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="0d90977";
|
const char* GIT_REV="1223aa7";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="rolling";
|
const char* GIT_BRANCH="rolling";
|
||||||
const char* BUILD_TIME="2020-10-24 11:45";
|
const char* BUILD_TIME="2020-10-25 19:48";
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
const char* GIT_REV="0d90977";
|
const char* GIT_REV="1223aa7";
|
||||||
const char* GIT_TAG="";
|
const char* GIT_TAG="";
|
||||||
const char* GIT_BRANCH="rolling";
|
const char* GIT_BRANCH="rolling";
|
||||||
const char* BUILD_TIME="2020-10-24 11:45";
|
const char* BUILD_TIME="2020-10-25 19:48";
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -13,7 +13,7 @@ SearchFieldY = 20
|
|||||||
|
|
||||||
|
|
||||||
[Digits]
|
[Digits]
|
||||||
Model=/config/dig0640s3.tflite
|
Model=/config/dig0650s3.tflite
|
||||||
LogImageLocation = /log/digit
|
LogImageLocation = /log/digit
|
||||||
ModelInputSize 20, 32
|
ModelInputSize 20, 32
|
||||||
digit1, 306, 120, 37, 67
|
digit1, 306, 120, 37, 67
|
||||||
|
|||||||
Binary file not shown.
BIN
sd-card/config/dig0650s3.tflite
Normal file
BIN
sd-card/config/dig0650s3.tflite
Normal file
Binary file not shown.
@@ -73,8 +73,8 @@ li.dropdown {
|
|||||||
|
|
||||||
<body style="font-family: arial">
|
<body style="font-family: arial">
|
||||||
|
|
||||||
<h1>Watermeter - AI on the edge</h1>
|
<h1>Digitizer - AI on the edge</h1>
|
||||||
<h2>An ESP32 all in neural network recognition system</h2>
|
<h2>An ESP32 all inclusive neural network recognition system for meter digitalization</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler_roi.html';">Overview</a></li>
|
<li><a href="#"onclick="document.getElementById('maincontent').src = '/wasserzaehler_roi.html';">Overview</a></li>
|
||||||
|
|||||||
@@ -23,9 +23,42 @@ div {
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<body style="font-family: arial; padding: 0px 10px;">
|
<body style="font-family: arial; padding: 0px 10px;">
|
||||||
|
<h3>Host Info</h3>
|
||||||
|
|
||||||
|
<table style="font-family: arial">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
Hostname:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div id="gitbranch">
|
||||||
|
<object data="/version?type=Hostname"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
IP-Address:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div id="gitbranch">
|
||||||
|
<object data="/version?type=IP"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
WLan-SSID:
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<div id="gitbranch">
|
||||||
|
<object data="/version?type=SSID"></object>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
<h3>Version Info</h3>
|
<h3>Version Info</h3>
|
||||||
|
|
||||||
<table style="font-family: arial">
|
<table style="font-family: arial">
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.0.0
|
1.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user