Introduction: Display Temperature on P10 LED Display Module Using Arduino

About: Electronics Component - PCB [Design, Printing, Inserting] - Electronic Programming

In the previous tutorial has been told how to display text on Dot Matrix LED Display P10 Module using Arduino and DMD Connector, which you can check here. In this tutorial we will give a simple project tutorial by utilizing P10 module as display media. This time we will give you tutorial about programming temperature sensor using LM35.

Step 1: Materials You Need

You will need:

  • Arduino Uno
  • DMD Connector
  • LM35 Temperature Sensor
  • Bread Board
  • Jumper Wires

Step 2: Connection

For the connection as shown above.

Step 3: Program

After the installation is complete go to programming, the programming requires additional library files that you can download >> Library DMD & TimeOne.

Examples of programs as follows:

/* Insert file library */
#include <SPI.h> #include <DMD.h> #include <TimerOne.h> #include <SystemFont5x7.h> #define Panjang 1 // Number of length of Display P10 #define Lebar 1 // Number of width of Display P10 #define sensor A5 // Define sensor pin = pin A5

DMD dmd(Panjang, Lebar); // Length x Width /* Deklarasi Variable */ float suhu; char chr[5]; void ScanDMD() { dmd.scanDisplayBySPI(); } void setup(void) { // Setup DMD Timer1.initialize( 5000 ); Timer1.attachInterrupt( ScanDMD ); dmd.selectFont(SystemFont5x7); // Font used dmd.clearScreen( true ); Serial.begin(9600); // Activate function of communication serial } void loop(void) { dmd.clearScreen( true ); suhu = 0; suhu = analogRead(sensor); suhu = (5.0 * suhu * 100.0) / 1024.0; Serial.println(suhu); dtostrf(suhu, 4, 2, chr); dmd.drawString( 2, 0, chr, 5, GRAPHICS_NORMAL ); dmd.drawString( 6, 9, "'Cel", 4, GRAPHICS_NORMAL ); delay(5000); }

LED Contest 2017

Participated in the
LED Contest 2017