Arduino-HomeKit-ESP8266
Arduino-HomeKit-ESP8266 copied to clipboard
Implement temperature, humidity and 2 switches and oled 0.96 to monitor the sensors.
Can anyone help me to add two switches and an oled 0.96" so that it shows the temp and humidity in the first sample temperature, humidity. I am new to coding and want to learn new things. I would be thankful if anyone can help me.
Just the other day I made this little project https://github.com/stuntstein/Arduino_homekit_temp-humi-sensor
Just the other day I made this little project https://github.com/stuntstein/Arduino_homekit_temp-humi-sensor
Cool! I’ll have to check it out, since I can’t get the temp working with any other code, and I’ve tried so many different versions. I also have an oled display never used.
Looks awesome! I guess it’s compatible with smaller oled screen, by adjusting the pixels right?
This is one of the smallest, but yes you can change the resolution:
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
You would also have to adapt the x,y offset when printing your text
display.setCursor(0, 12);
sprintf(s,"Tmp: %5.1fC", temp);
display.print(s);