Maker UNO DHT11 Alphanumeric Display

Introduction

In this tutorial, it is demonstrated how to display the DHT11, temperature and humidity value on the alphanumeric display using Maker Uno.

Video

Hardware Preparation

This is the list of items used in the video.

Circuit

There is no additional circuit is required since we are using the grove sensor. The DHT11 is connected to port D2 and the alphanumeric display is connected to port i2C of the grove base V2.

Code

The code for this tutorial is as shown below

#include <Wire.h>
#include "grove_alphanumeric_display.h"
#include "DHT.h"

#define DHTPIN 2     // what digital pin we're connected to

#define DHTTYPE DHT11   // DHT 11

Seeed_Digital_Tube tube;

DHT dht(DHTPIN, DHTTYPE);

void setup() {
  // put your setup code here, to run once:
  Wire.begin();
  dht.begin();
  
  tube.setTubeType(TYPE_2,TYPE_2_DEFAULT_I2C_ADDR);

  tube.setBrightness(10);
  tube.setBlinkRate(BLINK_OFF);
  

}

void loop() {
  // put your main code here, to run repeatedly:
  welcome();

  float h = dht.readHumidity();
  // Read temperature as Celsius (the default)
  float t = dht.readTemperature();

  tube.displayString("Humidity: ",100);
  tube.displayNum(h,100);
  delay(500);
  tube.displayString("Temperature: ", 100);
  tube.displayNum(t,100);
  delay(500);
  tube.displayString("°C ", 100);
  delay(500);

}

void welcome()
{
    tube.displayString("MAKER UNO + DHT11 + ALPHA DISPLAY", 100);
    delay(500);
  
}

Thank You

Thanks for reading this tutorial. If you have any technical inquiries, please post at Cytron Technical Forum.

Please be reminded, this tutorial is prepared for you to try and learn.
You are encouraged to improve the code for a better application.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Maker UNO DHT11 Alphanumeric Display
Internet Clock using Maker Pi Pico and CircuitPython
Snap & Fit ABS Case Stressberry Test
Maze Pro Passive Aluminum Case Stressberry Test
Acrylic Case for HQ Camera Stressberry Test
Tutorials of Cytron Technologies Scroll to Top