Popravki senzorji

This commit is contained in:
Gašper Dobrovoljc 2023-07-29 19:03:03 +02:00
parent f5f1b697a7
commit b466f43538
No known key found for this signature in database
GPG Key ID: 0E7E037018CFA5A5

View File

@ -78,16 +78,16 @@
byte mac[] = {0x06, 0x02, 0x03, 0x04, 0x05, 0x06};
// Arduino device IP Address
IPAddress ip(10, 10, 0, 140);
IPAddress ip(192, 168, 88, 206);
// Router gateway
IPAddress gateway(10, 10, 0, 1);
IPAddress gateway(192, 168, 88, 1);
// LAN subnet mask
IPAddress subnet(255, 255, 255, 0);
// DNS server
IPAddress dnsserver(10, 10, 0, 1);
IPAddress dnsserver(192, 168, 88, 1);
// port to run the http server on
const unsigned int serverPort = 8090;
@ -101,44 +101,34 @@ const unsigned int hubPort = 39501;
void setup() {
// Polling Sensors
static st::IS_Button wcTipka1(F("wcTipka1"), PIN_WC_TIPKA_1);
static st::IS_Button wcTipka2(F("wcTipka2"), PIN_WC_TIPKA_2);
static st::IS_Motion wcAlarm(F("wcAlarm"), PIN_WC_ALARM, HIGH, true);
static st::IS_Button wcTipka1(F("button1"), PIN_WC_TIPKA_1);
static st::IS_Button wcTipka2(F("button2"), PIN_WC_TIPKA_2);
static st::IS_Motion wcAlarm(F("motion1"), PIN_WC_ALARM, HIGH, true);
static st::PS_TemperatureHumidity wcTempVlaga(
F("wcTemperaturaVlaga"), 60, 40, PIN_WC_TEMPHUM,
st::PS_TemperatureHumidity::DHT22, "wcTemperatura", "wcVlaga");
F("temphumid1"), 60, 40, PIN_WC_TEMPHUM,
st::PS_TemperatureHumidity::DHT22, "temperature1", "humidity1");
static st::IS_Button hodnikZvonecTipka(F("hodnikZvonecTipka"),
PIN_HODNIK_ZVONEC_TIPKA);
static st::IS_Button hodnikZvonecTipka(F("button3"), PIN_HODNIK_ZVONEC_TIPKA);
static st::IS_Motion hodnikStopnisceSenzor(
F("hodnikStopnisceSenzor"), PIN_HODNIK_STOPNISCE_SENZOR, LOW, true);
static st::IS_Motion hodnikVrataSenzor(F("hodnikVrataSenzor"),
PIN_HODNIK_VRATA_SENZOR, LOW, true);
F("motion2"), PIN_HODNIK_STOPNISCE_SENZOR, LOW, true);
static st::IS_Motion hodnikVrataSenzor(F("motion3"), PIN_HODNIK_VRATA_SENZOR,
LOW, true);
static st::IS_Button jedilnicaTipka1(F("jedilnicaTipka1"),
PIN_JEDILNICA_TIPKA_1);
static st::IS_Button jedilnicaTipka2(F("jedilnicaTipka2"),
PIN_JEDILNICA_TIPKA_2);
static st::IS_Button jedilnicaTipka3(F("jedilnicaTipka3"),
PIN_JEDILNICA_TIPKA_3);
static st::IS_Button jedilnicaTipka4(F("jedilnicaTipka4"),
PIN_JEDILNICA_TIPKA_4);
static st::IS_Button jedilnicaTipka5(F("jedilnicaTipka5"),
PIN_JEDILNICA_TIPKA_5);
static st::IS_Button jedilnicaTipka1(F("button4"), PIN_JEDILNICA_TIPKA_1);
static st::IS_Button jedilnicaTipka2(F("button5"), PIN_JEDILNICA_TIPKA_2);
static st::IS_Button jedilnicaTipka3(F("button6"), PIN_JEDILNICA_TIPKA_3);
static st::IS_Button jedilnicaTipka4(F("button7"), PIN_JEDILNICA_TIPKA_4);
static st::IS_Button jedilnicaTipka5(F("button8"), PIN_JEDILNICA_TIPKA_5);
static st::IS_Button otroskaSobaTipka1(F("otroskaSobaTipka1"),
PIN_OTROSKA_TIPKA_1);
static st::IS_Button otroskaSobaTipka2(F("otroskaSobaTipka2"),
PIN_OTROSKA_TIPKA_2);
static st::IS_Button otroskaSobaTipka1(F("button9"), PIN_OTROSKA_TIPKA_1);
static st::IS_Button otroskaSobaTipka2(F("button10"), PIN_OTROSKA_TIPKA_2);
static st::PS_TemperatureHumidity podstrehaTempVlaga(
F("podstrehaTemperaturaVlaga"), 60, 40, PIN_PODSTREHA_TEMPVLAGA,
st::PS_TemperatureHumidity::DHT22, "podstrehaTemperatura",
"podstrehaVlaga");
F("temphumid2"), 60, 40, PIN_PODSTREHA_TEMPVLAGA,
st::PS_TemperatureHumidity::DHT22, "temperature2", "humidity2");
static st::PS_TemperatureHumidity dnevnaSobaTempVlaga(
F("dnevnaSobaTemperaturaVlaga"), 60, 40, PIN_DNEVNA_SOBA_TEMPVLAGA,
st::PS_TemperatureHumidity::DHT22, "dnevnaSobaTemperatura",
"dnevnaSobaVlaga");
F("temphumid3"), 60, 40, PIN_DNEVNA_SOBA_TEMPVLAGA,
st::PS_TemperatureHumidity::DHT22, "temperature3", "humidity3");
// Executors
static st::EX_Switch wcLuc1(F("switch1"), PIN_WC_LUC_1);