Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based Temperature Monitoring with OLED Display

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based Temperature Monitoring with OLED Display

Circuit Documentation

Summary

This circuit consists of an Arduino UNO microcontroller, an OLED 1.3" display, and a temperature sensor. The Arduino UNO serves as the central processing unit, controlling the OLED display to visualize data and reading temperature values from the temperature sensor. The OLED display is used to show graphical data or information, while the temperature sensor provides real-time temperature readings. The circuit is designed to operate with a 5V power supply, which is distributed to the components from the Arduino's 5V output pin. Communication between the Arduino and the OLED display is established via the I2C protocol, using the SCL and SDA lines. The temperature sensor is interfaced with the Arduino through a digital input pin.

Component List

Arduino UNO

OLED 1.3" Display

Temperature Sensor

Wiring Details

Arduino UNO

OLED 1.3" Display

Temperature Sensor

Documented Code

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0 | U8G_I2C_OPT_NO_ACK | U8G_I2C_OPT_FAST);

// Bitmap array representing the graphical data to be displayed on the OLED
const unsigned char epd_bitmap_oiltempupdated [] PROGMEM = {
  // Bitmap data omitted for brevity
};

int progress = 0;   // Progress of the gauge

void setup() {
  pinMode(A0, INPUT);
  u8g.setFont(u8g_font_tpssb);  // Set the font for the display
  u8g.setColorIndex(1);         // Set the color to white
}

void loop() {
  u8g.firstPage();
  do {
    u8g.setColorIndex(1);  // Set the color to white
    u8g.drawBitmapP(0, 0, 128/8, 64, epd_bitmap_oiltempupdated);
    u8g.setColorIndex(0);  // Set the color to black
    u8g.drawBox(2, 25, 125, 11);
    u8g.setColorIndex(1);  // Set the color to white
    u8g.drawBox(2, 25, map(progress, 0, 1023, 0, 125), 11);
  } while ( u8g.nextPage() );

  progress = analogRead(A0);  // Read the analog value from pin A0
}

Code Explanation