Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement temperature, humidity and 2 switches and oled 0.96 to monitor the sensors. #244

Open
KaitoKK1412 opened this issue Jan 30, 2024 · 5 comments

Comments

@KaitoKK1412
Copy link

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.

@stuntstein
Copy link

Just the other day I made this little project
https://github.com/stuntstein/Arduino_homekit_temp-humi-sensor

@jockethebastard
Copy link

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.

@stuntstein
Copy link

IMG_1986

@jockethebastard
Copy link

Looks awesome! I guess it’s compatible with smaller oled screen, by adjusting the pixels right?

@stuntstein
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants