Community project

Smart Classroom Welcome Monitor

Dev Hacker

Published July 19, 2026

Arduino4 components5 assembly steps
Remix this project
Photo of Smart Classroom Welcome Monitor

This smart classroom monitor displays real-time temperature and humidity readings on an LED matrix while alerting when the room gets too warm. Built around an Arduino Uno, DHT11 sensor, and MAX7219 LED matrix display, it continuously monitors classroom conditions and triggers a red LED warning light if temperature exceeds a configurable threshold.

The guide includes a complete wiring diagram showing breadboard layout, a full parts list with recommended suppliers, Arduino firmware with configurable thresholds and scroll speed, and step-by-step assembly instructions. Readers will learn how to wire SPI communication to the LED matrix, integrate analog sensor readings, and implement real-time environmental monitoring on a microcontroller.

Wiring diagram

Interactive · read-only
Wiring diagram for Smart Classroom Welcome Monitor

Pan and zoom to explore the wiring. Remix the project to edit it in your own workspace.

Parts list

Bill of materials
ComponentQtyNotes
DHT111Digital temperature and humidity sensor (lower accuracy than DHT22)
LEDRed1Standard 3mm/5mm through-hole LED. A current-limiting series resistor is added automatically.
Resistor220 Ω1Through-hole resistor (current-limiting in series with an LED)
MAX7219 LED Matrix Display1Serial LED matrix / 7-segment display driver IC module. Drives one 8x8 LED matrix or up to eight 7-segment digits. Cascadable for multi-digit or multi-matrix displays. Uses a 5V supply with segment current set by an external RSET resistor. Communicates with DIN, CLK, and LOAD/CS; when powered at 5V the datasheet logic-high threshold is 3.5V, so use level shifting for strict 3.3V hosts.

Assembly

5 steps
  1. Breadboard power rails

    Connect the UNO's 5V pin to the breadboard's red (+) rail and GND to the blue (−) rail. This powers all components from the board's USB supply.

    • Tip: Double-check the polarity — 5V to red, GND to blue.
  2. Wire the MAX7219 LED Matrix

    Plug the MAX7219 module into the breadboard. Connect: • VCC → 5V rail • GND → GND rail • DIN → UNO D11 • CLK → UNO D13 • CS → UNO D8

    • Tip: DIN, CLK and CS are the only three signal wires needed.
    • Tip: If you have more than one panel, daisy-chain DOUT of the first into DIN of the second and change MAX_DEVICES to 2 in the firmware.
  3. Wire the DHT11 sensor

    Plug the DHT11 module into the breadboard. Connect: • VCC (or +) → 5V rail • GND (or −) → GND rail • DATA (or S/OUT) → UNO D2

    • Tip: The Elegoo kit DHT11 is a 3-pin module — the middle pin is DATA.
    • Tip: Leave at least 1 cm clearance from heat sources for accurate readings.
  4. Wire the red LED and resistor

    Insert the 220 Ω resistor between UNO D3 and the LED's ANODE (longer leg). Connect the LED's CATHODE (shorter leg) to GND rail.

    • Tip: The longer leg of the LED is the anode (+); the flat side of the LED body marks the cathode (−).
    • Never connect an LED directly to a GPIO pin without the resistor — it will burn out.
  5. Power up and verify

    Plug the UNO into USB. The LED matrix should start scrolling temperature and humidity within 2 seconds of power-on. The red LED lights up automatically when the temperature exceeds 27 °C.

    • Tip: Open Serial Monitor at 9600 baud to see live sensor readings.
    • Tip: If the matrix is too dim or too bright, change the setIntensity(4) value (0–15) in the firmware and redeploy.

Pin assignments

Board wiring reference
PinConnectionType
5Vdht11 VCCpower
GNDdht11 GNDground
GPIO 2dht11 DATAdata
GPIO 3r1 P1digital
EXTr1 P2LED ANODEdigital
GNDred_led GNDground
5Vmatrix VCCpower
GNDmatrix GNDground
GPIO 11matrix DINspi
GPIO 13matrix CLKspi
GPIO 8matrix CSspi

Firmware

Arduino
src/main.cppDeploy to device
#include <Arduino.h>
#include <DHT.h>
#include <MD_Parola.h>
#include <MD_MAX72xx.h>
#include <SPI.h>

// ── Pin definitions ───────────────────────────────────────────────
#define DHT_PIN         2
#define LED_PIN         3
#define MATRIX_DIN_PIN  11
#define MATRIX_CLK_PIN  13
#define MATRIX_CS_PIN   8

// ── Config ────────────────────────────────────────────────────────
#define DHTTYPE         DHT11
#define MAX_DEVICES     1          // Change to 2, 3 … for more panels
#define SCROLL_SPEED    120        // Lower = faster scroll (ms per step)
#define HOT_THRESHOLD   27.0f      // °C — red LED turns on above this
#define SENSOR_INTERVAL 3000UL     // ms between sensor reads

// ── Objects ───────────────────────────────────────────────────────

// Forward declarations
void readSensor();

DHT dht(DHT_PIN, DHTTYPE);
MD_Parola matrix = MD_Parola(MD_MAX72XX::FC16_HW, MATRIX_CS_PIN, MAX_DEVICES);

// ── State ─────────────────────────────────────────────────────────
char displayBuf[32];
float lastTemp = 0.0f;
float lastHum  = 0.0f;
unsigned long lastSensorRead = 0;

// ── Helpers ───────────────────────────────────────────────────────
void readSensor() {
    float t = dht.readTemperature();
    float h = dht.readHumidity();
    if (!isnan(t)) lastTemp = t;
    if (!isnan(h)) lastHum  = h;

    // Red LED
    digitalWrite(LED_PIN, lastTemp > HOT_THRESHOLD ? HIGH : LOW);

    // Build display string  e.g.  "Temp:24C  Hum:55%"
    snprintf(displayBuf, sizeof(displayBuf),
             "Temp:%dC  Hum:%d%%",
             (int)round(lastTemp), (int)round(lastHum));
}

void setup() {
    Serial.begin(9600);
    pinMode(LED_PIN, OUTPUT);
    digitalWrite(LED_PIN, LOW);

    dht.begin();

    matrix.begin();
    matrix.setIntensity(4);          // 0 (dim) – 15 (bright)
    matrix.setTextAlignment(PA_LEFT);

    // First sensor read
    delay(2000);                     // DHT11 warm-up
    readSensor();

    // Kick off first scroll
    matrix.displayScroll(displayBuf, PA_LEFT, PA_SCROLL_LEFT, SCROLL_SPEED);

    Serial.println(F("Smart Classroom ready."));
}

void loop() {
    // Update display on each scroll completion
    if (matrix.displayAnimate()) {

        // Time to refresh sensor?
        unsigned long now = millis();
        if (now - lastSensorRead >= SENSOR_INTERVAL) {
            lastSensorRead = now;
            readSensor();
            Serial.print(F("Temp: ")); Serial.print(lastTemp);
            Serial.print(F(" C  Hum: ")); Serial.print(lastHum);
            Serial.println(F(" %"));
        }

        // Restart the scroll with the (possibly updated) buffer
        matrix.displayScroll(displayBuf, PA_LEFT, PA_SCROLL_LEFT, SCROLL_SPEED);
    }
}

“Deploy to device” opens this project in Schematik, where you can flash it to your board over USB.

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace — diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik