-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a876a30
commit acd0ab2
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
/*|Autor: Martin Chlebovec (martinius96) |*/ | ||
/*|E-mail: [email protected] |*/ | ||
/*|Info k projektu (schéma): https://martinius96.github.io/hladinomer-studna-scripty/ |*/ | ||
/*|Testovacie webove rozhranie HTTPS: https://hladinomer.000webhostapp.com/ |*/ | ||
/*|Revízia: 20. Január 2022 |*/ | ||
/*|Testovacie webove rozhranie HTTPS: https://arduino.clanweb.eu/studna_s_prekladom/ |*/ | ||
/*|Revízia: 9. Nov 2023 |*/ | ||
/*|-----------------------------------------------------------------------------------|*/ | ||
|
||
#include <string.h> | ||
|
@@ -46,7 +46,7 @@ | |
#define GPIO_ECHO 23 | ||
// Webserver | ||
/* Constants that aren't configurable in menuconfig */ | ||
#define WEB_SERVER "waterwell-arduino.000webhostapp.com" | ||
#define WEB_SERVER "arduino.clanweb.eu" | ||
#define WEB_PORT "443" | ||
|
||
|
||
|
@@ -191,7 +191,7 @@ static void https_get_task(void *pvParameters) | |
char REQUEST [1000]; | ||
char values [250]; | ||
sprintf(values, "hodnota=%d&token=123456789", distance); | ||
sprintf (REQUEST, "POST /data.php HTTP/1.0\r\nHost: "WEB_SERVER"\r\nUser-Agent: ESP32\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded;\r\nContent-Length:%d\r\n\r\n%s\r\n",strlen(values),values); | ||
sprintf (REQUEST, "POST /studna_s_prekladom/data.php HTTP/1.0\r\nHost: "WEB_SERVER"\r\nUser-Agent: ESP32\r\nConnection: close\r\nContent-Type: application/x-www-form-urlencoded;\r\nContent-Length:%d\r\n\r\n%s\r\n",strlen(values),values); | ||
mbedtls_net_init(&server_fd); | ||
|
||
ESP_LOGI(TAG, "Connecting to %s:%s...", WEB_SERVER, WEB_PORT); | ||
|