Classroom Temperature Display
Wire an Adafruit MCP9808 digital temperature sensor and an Adafruit 4-digit 7-segment display on the shared I2C bus. Read ambient degrees Celsius and show them on the display.
Classroom Temperature Display
Objectives
- Connect MCP9808 (address 0x18) and 7-segment display (address 0x70) to 5V, GND, SCL, and SDA.
- Program a loop reading temperature in °C and writing to the numeric display.
- Observe at least 3 display updates matching simulated temperature changes.
Expected behavior
The 4-digit display illuminates and displays temperature in degrees Celsius (e.g. ' 24.5'), updating as temperature changes.
What this simulation can and cannot show
Instrumentation model: simulated temperature values in °C (step 0.5 °C). This is an educational readout, not an HVAC controller, heater, or air conditioning driver.
Choose how to start
Start blank to place every part yourself, or load the starter: board, breadboard, resistor, LED and an unbound blink program. You still insert parts, make each connection and bind the blocks.
Build steps
0 / 10 steps complete
- Place UNO R3 (Not yet)
Provides 5V, GND and I2C lines SCL and SDA.
- Place sensor module (Not yet)
Place the Adafruit MCP9808 precision temperature sensor module.
- Place display module (Not yet)
Place the Adafruit 0.56" 4-digit 7-segment display backpack.
- Wire power to modules (Not yet)
Connect 5V and GND to both the MCP9808 and 7-segment display.
- Wire SCL clock line (Not yet)
Wire UNO pin SCL to the SCL terminals on both modules.
- Wire SDA data line (Not yet)
Wire UNO pin SDA to the SDA terminals on both modules.
- Check bus pull-ups (Not yet)
The MCP9808 onboard 10 kΩ pull-ups satisfy the I2C bus requirement.
- Build display program (Not yet)
In a repeat loop, read temperature and write to the display, waiting 1 s.
- Bind I2C blocks (Not yet)
Bind temperature read block to the MCP9808 and display block to the 7-segment display.
- Run and observe updates (Not yet)
Observe at least 3 temperature updates displayed with one decimal place.
Lesson check
Run the circuit when every build step is done. Completion needs three observed ON/OFF cycles with both one-second waits.
Cycles observed: of 3
Completion is saved only in this browser. It is not synced to an account and is not a certificate.
Open the Code tab to read the generated C++: both delay(1000) waits appear inside the repeat loop. It is not compiled or flashed.
Hints
- Both modules share the same SCL and SDA lines in parallel.
- Use `read I2C temperature` inside `show on display` block.
Bill of Materials
arduino-uno-r3-a000066(v1) × 1 — Microcontroller board (5V logic)adafruit-mcp9808-5027(v1) × 1 — MCP9808 precision digital temperature sensor (I2C 0x18)adafruit-7segment-878-red-4pin(v1) × 1 — 0.56" 4-digit 7-segment display backpack (I2C 0x70)
Wiring Explanation
Connect both I2C modules to UNO 5V and GND. Wire MCP9808 SCL to UNO pin SCL and SDA to pin SDA. Wire the 7-segment display clock (C) to SCL and data (D) to SDA. The MCP9808 module provides the required 10 kΩ I2C pull-up resistors.
Draft lesson and translations — fluent educator review pending.
Board inspector
This project has no board yet.
Add a supported board to check wiring, simulate and preview code. Physical compatibility is unverified.
Lessons keep their board. Use a free project to try another board.
Wiring checks
Limited virtual teaching rules — not physical safety certification or a general electrical solver. Passing wiring checks does not run code or award completion.
Draft explanations and translations — fluent educator review pending.
Wiring checks blocked
Error: 0 · Warning: 0 · Unsupported: 1
Unsupported ·
missing-boardThis draft has no programmable board.
Repair hint: Add a supported board and connect its named terminals explicitly.
Involved IDs
Parts tray
Planned boards and parts
Shown for planning only. They cannot be added, simulated or exported yet.
- Raspberry Pi Pico W · RP2040 · Not available yet · Planned gate C
- Raspberry Pi Pico 2 · RP2350 · Not available yet · Planned gate C
- Raspberry Pi 4 Model B · other RAM sizes and PCB revisions · Not available yet · Planned gate D
- BeagleBone Black Wireless · Not available yet · Planned gate D
- Analog temperature and water-level circuit inputs · Not available yet · Planned gate C
- Motors, servos, other displays and SPI/UART bus modules · Not available yet · Planned gate C
Terminal inspector
None
Connections
Use these labelled controls instead of dragging or selecting small terminals. Wires cross without joining.
No wires yet.
Program components
Choose the actual component for each block. Names can change; IDs and wiring stay fixed. Pin selection never rewires the circuit.
Draft translations — fluent educator review pending.
Add an ON/OFF, brightness, button, analog reading, temperature or display block to bind a component.
Board code and wiring
Read-only generated code and simulation illustration. Not compiled, flashed or physically verified. Draft translations need educator review.
Export unavailable: repair wiring, board modes and program bindings in Circuit / Blocks.
Export unavailable: repair wiring, board modes and program bindings in Circuit / Blocks.Circuit document (JSON, read-only)
Limited circuit simulation for the published UNO R3 and ESP32-DevKitC V4 teaching profiles. Code view offers qualified C++ and JavaScript previews (plus MicroPython for ESP32) with wiring manifests, plus document JSON. No CPU, Wi-Fi or Bluetooth is simulated, and physical compatibility is unverified.
{
"schemaVersion": 3,
"kind": "circuit",
"circuitSchemaVersion": 1,
"mode": "lesson",
"board": null,
"components": [],
"connections": [],
"configuration": {
"teachingModel": "circuit"
},
"workspace": {
"blocks": {
"languageVersion": 0,
"blocks": [
{
"type": "irr_start",
"id": "program-start",
"x": 30,
"y": 30
}
]
}
},
"bindings": [],
"layout": {
"viewport": {
"x": 0,
"y": 0,
"zoom": 1
},
"panel": "circuit"
},
"lesson": {
"id": "wired-temperature-display",
"version": 1
}
}Select a part, then drag it or use arrow keys to move it. In Wire mode, choose two terminals. Visual overlap never creates electrical contact; use the attachment form to occupy a breadboard hole.
Limited circuit simulation for the published UNO R3 and ESP32-DevKitC V4 teaching profiles. Code view offers qualified C++ and JavaScript previews (plus MicroPython for ESP32) with wiring manifests, plus document JSON. No CPU, Wi-Fi or Bluetooth is simulated, and physical compatibility is unverified.
Draft learning copy and translations — fluent educator review is still required.
Guest circuit projects
Saved on this browser. Nothing uploads automatically; a signed-in adult or educator can press Save to cloud for a private copy. Download a copy before clearing browser data.
Local save pending
Draft explanations and en/rw/fr translations need fluent educator review.