Rollback homekita

This commit is contained in:
sieja
2025-09-19 18:46:31 +02:00
parent 601c624d65
commit 5fd8c3be40

View File

@@ -5,9 +5,6 @@
#include "DHT.h"
#include <Adafruit_NeoPixel.h>
#include <BH1750.h>
#include "HomeSpan.h"
#include "DEV_LED.h"
#define Version "0.3.3"
@@ -181,7 +178,7 @@ uint32_t Wheel(byte pos) {
}
void setup() {
Serial.begin(115200);
Serial.begin(9600);
if (!display.begin(SSD1306_SWITCHCAPVCC, SCREEN_ADDRESS)) {
Serial.println(F("SSD1306 allocation failed"));
}
@@ -225,31 +222,7 @@ void setup() {
} else {
dimmVal = 24;
}
// ##### HOME SPAN
homeSpan.setPairingCode("11122333");
homeSpan.setQRID("111-22-333");
// konfiguracja WIFI przez port szerefowy "W<returm"
// 1.Płytka ESP32 Dev Module
// 2 Partycja: Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
// 3. konfiguracja WIFI przez port szerefowy komenda "W", U - unpair
homeSpan.begin(Category::Bridges,"HomeSpan Bridge");
new SpanAccessory();
new Service::AccessoryInformation();
new Characteristic::Identify();
new SpanAccessory();
new Service::AccessoryInformation();
new Characteristic::Identify();
new Characteristic::Name("RGB LED");
new DEV_RgbLED();
// ##### HOME SPAN END
} //setup end
void loop() {
neoPixelRed = int(RedHomeKit/10);
neoPixelGreen = int(GreenHomeKit/10);
neoPixelBlue = int(BlueHomeKit/10);
// ###################################################
// WYŚWIETLACZ
display.clearDisplay();
@@ -479,6 +452,7 @@ void loop() {
}
//NEOPIXELS
// #################################################################
// #################################################################
@@ -496,19 +470,4 @@ void loop() {
// pixels.setPixelColor(ADR_NEOPXL_TANK, pixels.Color(neoPixelGreen*dimmVal*neoPixelSwitch*neoPixelTank, neoPixelRed*dimmVal*neoPixelSwitch*neoPixelTank, neoPixelBlue*dimmVal*neoPixelSwitch*neoPixelTank));
pixels.show();
// rainbowCycle(10); // im mniejsza liczba, tym szybsza animacja
homeSpan.poll();
Serial.println("---------------------------");
Serial.print("R: ");
Serial.println(RedHomeKit);
Serial.print("G: ");
Serial.println(GreenHomeKit);
Serial.print("B: ");
Serial.println(BlueHomeKit);
Serial.print("turnOnFlag: ");
Serial.println(turnOnFlag);
delay(500);
}