vault backup: 2024-05-15 19:12:54
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
ppm Werte:
|
||||
- Standard: 300 - 450ppm
|
||||
|
||||
ppm Ampel:
|
||||
- Grün: ppm<=550
|
||||
- Gelb: ppm >= 551 && ppm <= 799
|
||||
- Rot: ppm >= 800
|
||||
|
||||
|
||||
|
||||
http://www.learningaboutelectronics.com/Articles/MQ-7-carbon-monoxide-sensor-circuit-with-arduino.php
|
||||
@@ -0,0 +1,9 @@
|
||||
- [x] Add dashboard ✅ 2023-10-18
|
||||
- [x] Save selected rooms to browser ✅ 2023-10-18
|
||||
- [x] Get current temp ✅ 2023-10-18
|
||||
- [ ] Get avg temp over set time eg. 1 hour
|
||||
- [ ] Let user pick time window to display data.
|
||||
- [ ] Don't prerender room
|
||||
- /rooms/...
|
||||
- [ ]
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
````.ino
|
||||
#include <ESP8266WiFi.h>
|
||||
|
||||
#include <ESP8266HTTPClient.h>
|
||||
|
||||
#include <WiFiClientSecure.h>
|
||||
|
||||
#include <WiFiClient.h>
|
||||
|
||||
#include <ArduinoJson.h>
|
||||
|
||||
|
||||
|
||||
const int rows = 3;
|
||||
|
||||
const char* wlans[rows][2] = { { "Privat W-LAN", "99842DA5D0" }, { "Rose", "Lodner2023" }, { "Privat W-LAN", "99842DA5D0" } };
|
||||
|
||||
const char* serverAddress = "https://api.temperature-station.lodner.dev/measurement";
|
||||
|
||||
|
||||
|
||||
WiFiClientSecure client;
|
||||
|
||||
HTTPClient https;
|
||||
|
||||
|
||||
|
||||
void setup() {
|
||||
|
||||
Serial.begin(9600);
|
||||
|
||||
|
||||
|
||||
Serial.println("Start connecting to wlan.");
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < rows; ++i) {
|
||||
|
||||
WiFi.begin(wlans[i][0], wlans[i][1]);
|
||||
|
||||
Serial.print("Connecting to: ");
|
||||
|
||||
Serial.println(wlans[i][0]);
|
||||
|
||||
|
||||
|
||||
int trys = 0;
|
||||
|
||||
while (WiFi.status() != WL_CONNECTED && trys < 30) {
|
||||
|
||||
Serial.print("Err connecting to: ");
|
||||
|
||||
Serial.print(wlans[i][0]);
|
||||
|
||||
Serial.print(" Versuch: ");
|
||||
|
||||
Serial.println(trys + 1);
|
||||
|
||||
trys++;
|
||||
|
||||
delay(1000);
|
||||
|
||||
}
|
||||
|
||||
Serial.println("");
|
||||
|
||||
|
||||
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
|
||||
Serial.print("Connected to WiFi network with IP Address: ");
|
||||
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
|
||||
Serial.print("Connected to WiFi network with IP Address: ");
|
||||
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
} else {
|
||||
|
||||
// TODO: LED = 1 when not connected?
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void loop() {
|
||||
|
||||
// put your main code here, to run repeatedly:
|
||||
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user