arduino temperature and humidity sensor oled display

Arduino Temperature and Humidity Sensor OLED Display

Arduino Temperature and Humidity Sensor OLED Display


In this article, we will explore the Arduino temperature and humidity sensor OLED display project. We will provide a step-by-step guide on how to build the project and showcase its various applications. The main sections of this article include:

  1. Introduction
  2. Materials Needed
  3. Circuit Connections
  4. Code Implementation
  5. Usage and Applications
  6. Conclusion


The Arduino temperature and humidity sensor OLED display project aims to create a device that can accurately measure and display real-time temperature and humidity data. It utilizes an Arduino board, a temperature and humidity sensor, and an OLED display module.

Materials Needed

  • Arduino board
  • Temperature and humidity sensor
  • OLED display module
  • Jumper wires
  • Breadboard

Circuit Connections

To build the circuit, follow these steps:

  1. Connect the VCC pin of the temperature and humidity sensor to the 5V pin on the Arduino.
  2. Connect the GND pin of the sensor to the GND pin on the Arduino.
  3. Connect the data pin of the sensor to a digital pin on the Arduino.
  4. Connect the SDA and SCL pins of the OLED display module to their respective pins on the Arduino.
  5. Make sure all connections are secure.

Code Implementation

Write the following code in the Arduino IDE:

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <DHT.h>
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);
#define DHTPIN 2
#define DHTTYPE DHT11
void setup() {
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
void loop() {
  float temperature = dht.readTemperature();
  float humidity = dht.readHumidity();
  display.println("Temperature: " + String(temperature) + " °C");
  display.println("Humidity: " + String(humidity) + " %");

Usage and Applications

The Arduino temperature and humidity sensor OLED display has various applications:

  • Home automation systems: Monitor indoor temperature and humidity for optimal comfort.
  • Greenhouses: Ensure proper environmental conditions for plant growth.
  • Weather stations: Collect weather data for analysis.
  • Data logging: Save temperature and humidity data for further analysis.


In conclusion, the Arduino temperature and humidity sensor OLED display project offers a versatile and practical solution for monitoring and displaying temperature and humidity data. With its easy-to-follow instructions and wide range of applications, it is an excellent project for both beginners and experienced Arduino enthusiasts.

Related Post

What is a Thermocouple Transmitter?

A thermocouple transmitter is a device designed to convert the temperature readings obtained from a thermocouple sensor into a standardized electrical signal. This electrical signal can then be transmitted over

Shopping Cart
Scroll to Top
Scroll to Top