SlideShare a Scribd company logo
Arduino Final Project

By: Mhmoud Salama.
    Hussam Hamdy.
Main Project
• To make a temperature sensor that outputs the reading
  as a scrolling message on a LED matrix.
• We used a LED matrix which is a common anode 8x8
  display.
• Wired on breadboards.
Main Concept
• Use of two shift registers (2x 74HC595) to pass the
  encoded-charachter data serially from the arduino as a
  parallel output to the rows and Columns of an 8x8 LED
  matrix.

• The arduino handles the scrolling of the message and the
  periodic time-multiplexing of rows and columns (refresh
  rate = 100Hz), using a periodic interrupt, to which the
  function “screenUpdate” is attached.

• So , we calibrated the sensor using a potentiometer
  through the serial monitor window.
• then the complete circuit is connected.
Wiring Diagram
74HC595-Shift Registers




-- An 8-bit shift register with
Serial to parallel capability.
-- We use two of them, Each
one controlling eight
rows/columns.
LM335-Temperature Sensor
• Calibration:

 -- We connect the calibration circuit , and
 connected it’s output as an analogue input to
 the arduino.

 -- With a potentiometer, and a small code...
 we used the serial monitor of arduino to
  fine-tune the sensor to give an acceptable
 reading (28 C for average room temperature).
CODE
•   #include <TimerOne.h>
•   #include <charEncodings.h>           // Each charachter and it’s (8x8 LED matrix)-mapped code.

•   // BASIC PIN CONFIGURATION
•   // AND DECLARATIONS

•   //Pin connected to Pin 12 of 74HC595 (Latch)
•   int latchPin = 8;
•   //Pin connected to Pin 11 of 74HC595 (Clock)
•   int clockPin = 12;
•   //Pin connected to Pin 14 of 74HC595 (Data)
•   int dataPin = 11;

•   // pin for the potentiometer to control the scrolling speed
•   int potPin = 5;

•   // pin for reading the temperature
•   int tempPin = 4;

•   // this is the gobal array that represents what the matrix
•   // is currently displaying
•   uint8_t led[8];
CODE
• void setup()
• {
    //set pins to output
•     pinMode(latchPin, OUTPUT);
•     pinMode(clockPin, OUTPUT);
•     pinMode(dataPin, OUTPUT);
•     pinMode(potPin, INPUT);
•     pinMode(tempPin, INPUT);
•     analogReference(INTERNAL);

•     // attach the screenUpdate function to the interrupt timer
•   // Period=10,000micro-second /refresh rate =100Hz
•   Timer1.initialize(10000);
•   Timer1.attachInterrupt(screenUpdate);
•   }
CODE
• //Continuous LOOP
• void loop()
• {
• long counter1 = 0;
• long counter2 = 0;
• char reading[10];
• char buffer[18];

•     if (counter1++ >=100000) {
•       counter2++;
•     }
•     if (counter2 >= 10000) {
•       counter1 = 0;
•       counter2 = 0;
•     }

    getTemp(reading);
    displayScrolledText(reading);
}
The (displayScrolledText ) Function

•   void displayScrolledText(char* textToDisplay)
•   {

•    int textLen = strlen(textToDisplay);
•    char charLeft, charRight;

•    // scan through entire string one column at a time and call
•    // function to display 8 columns to the right
•    for (int col = 1; col <= textLen*8; col++)
•   {
•
•       // if (col-1) is exact multiple of 8 then only one character
•       // involved, so just display that one

•       if ((col-1) % 8 == 0 )
•   {
•           char charToDisplay = textToDisplay[(col-1)/8];
•
•   for (int j=0; j<8; j++)
•      {
•        led[j] = charBitmaps[charToDisplay][j];
•      }

•       }

•           else
•       {
•           int charLeftIndex = (col-1)/8;
•           int charRightIndex = (col-1)/8+1;

•           charLeft = textToDisplay[charLeftIndex];
• // check we are not off the end of the string
•     if (charRightIndex <= textLen)
•     {
•       charRight = textToDisplay[charRightIndex];
•     }
•     else
•     {
•       charRight = ' ';
•     }
•     setMatrixFromPosition(charLeft, charRight, (col-1) % 8);
•   }

•       int delayTime = analogRead(potPin);

•       delay (delayTime);
•   }
•}
•   void shiftIt(byte dataOut) {
•    // Shift out 8 bits LSB first,
•    // on rising edge of clock

•    boolean pinState;

•    //clear shift register read for sending data
•    digitalWrite(dataPin, LOW);

•    // for each bit in dataOut send out a bit
•    for (int i=0; i<=7; i++) {
•     //set clockPin to LOW prior to sending bit
•     digitalWrite(clockPin, LOW);

•        // if the value of DataOut and (logical AND) a bitmask
•        // are true, set pinState to 1 (HIGH)
•        if ( dataOut & (1<<i) ) {
•          pinState = HIGH;
•        }
•        else {
•          pinState = LOW;
•        }

•        //sets dataPin to HIGH or LOW depending on pinState
•        digitalWrite(dataPin, pinState);
•        //send bit out on rising edge of clock
•        digitalWrite(clockPin, HIGH);
•        digitalWrite(dataPin, LOW);
•    }
• //stop shifting
• digitalWrite(clockPin, LOW);
• }

• boolean isKeyboardInput() {

• // returns true is there is any characters in the keyboard buffer
• return (Serial.available() > 0);
• }

• }

• // terminate the string
• readString[index] = '0';
• }
•   void setMatrixFromPosition(char charLeft, char charRight, int col) {

•       // take col left most columns from left character and bitwise OR with 8-col from
•       // the right character
•       for (int j=0; j<8; j++) {
•         led[j] = charBitmaps[charLeft][j] << col | charBitmaps[charRight][j] >> 8-col;
•       }
•   }


•   void screenUpdate() {

•       uint8_t col = B00000001;

•       for (byte k = 0; k < 8; k++) {
•        digitalWrite(latchPin, LOW); // Open up the latch ready to receive data

•        shiftIt(~led[7-k]);
•        shiftIt(col);

•        digitalWrite(latchPin, HIGH); // Close the latch, sending the registers data to the matrix
•        col = col << 1;
•       }
•       digitalWrite(latchPin, LOW);
•       shiftIt(~0 );
•       shiftIt(255);
•       digitalWrite(latchPin, HIGH);
•   }
•   void getTemp(char* reading) {

•       int span = 20;
•       int aRead = 0;
•       long temp;
•       char tmpStr[10];

•       // average out several readings
•       for (int i = 0; i < span; i++) {
•         aRead = aRead+analogRead(tempPin);
•       }

•       aRead = aRead / span;

•       temp = ((100*1.1*aRead)/1024)*10;

•       reading[0] = '0';

•       itoa(temp/10, tmpStr, 10);
•       strcat(reading,tmpStr);
•       strcat(reading, ".");
•       itoa(temp % 10, tmpStr, 10);
•       strcat(reading, tmpStr);
•       strcat(reading, "C");

•   }

More Related Content

What's hot (20)

PPTX
Input Output programming in AVR microcontroller
Robo India
 
PPTX
Unix signals
Isaac George
 
PDF
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
PDF
The IoT Academy IoT Training Arduino Part 3 programming
The IOT Academy
 
DOCX
Alu description[1]
Ayeen Muhammad
 
PPT
14827 shift registers
Sandeep Kumar
 
PDF
Arduino Workshop 2011.05.31
Shigeru Kobayashi
 
PPT
Digital logic design DLD Logic gates
Salman Khan
 
PPTX
Registers siso, sipo
DEPARTMENT OF PHYSICS
 
PDF
8 bit single cycle processor
Dhaval Kaneria
 
ODP
FPGA Tutorial - LCD Interface
Politeknik Elektronika Negeri Surabaya
 
DOCX
Uart
cs1090211
 
PDF
Using Timers in PIC18F Microcontrollers
Corrado Santoro
 
PPT
Digital logic design lecture 04
FarhatUllah27
 
PPTX
New microsoft office power point presentation
arushi bhatnagar
 
PPTX
Logic gate
Prasanna Bandara
 
PDF
Day4 順序控制的循序邏輯實現
Ron Liu
 
PDF
Shift register
Ashwini Yadav
 
PPTX
EASA Part 66 Module 5.5 : Logic Circuit
soulstalker
 
PDF
Shift registers
Ravi Maurya
 
Input Output programming in AVR microcontroller
Robo India
 
Unix signals
Isaac George
 
Experiment write-vhdl-code-for-realize-all-logic-gates
Ricardo Castro
 
The IoT Academy IoT Training Arduino Part 3 programming
The IOT Academy
 
Alu description[1]
Ayeen Muhammad
 
14827 shift registers
Sandeep Kumar
 
Arduino Workshop 2011.05.31
Shigeru Kobayashi
 
Digital logic design DLD Logic gates
Salman Khan
 
Registers siso, sipo
DEPARTMENT OF PHYSICS
 
8 bit single cycle processor
Dhaval Kaneria
 
FPGA Tutorial - LCD Interface
Politeknik Elektronika Negeri Surabaya
 
Uart
cs1090211
 
Using Timers in PIC18F Microcontrollers
Corrado Santoro
 
Digital logic design lecture 04
FarhatUllah27
 
New microsoft office power point presentation
arushi bhatnagar
 
Logic gate
Prasanna Bandara
 
Day4 順序控制的循序邏輯實現
Ron Liu
 
Shift register
Ashwini Yadav
 
EASA Part 66 Module 5.5 : Logic Circuit
soulstalker
 
Shift registers
Ravi Maurya
 

Viewers also liked (20)

PPTX
Temperature Sensor
EnricVentosa
 
PPTX
CONTROL FAN AC USING TEMPERATURE SENSOR LM35 BASED ON ARDUINO UNO
Susanti Arianto
 
DOCX
A 64-by-8 Scrolling Led Matrix Display System
Samson Kayode
 
PDF
5x7 matrix led display
Vatsal N Shah
 
PPTX
Automatic DC Fan using LM35 (english version)
Nurlatifa Haulaini
 
DOC
Moving message display
viraj1989
 
PPTX
Arduino Workshop
atuline
 
PDF
Catalogo unitronics 2012_intrave
INTRAVE IndustrialAutomation
 
PPTX
8x8 dot matrix(project)
Shahrin Ahammad
 
PPTX
Introduction to Arduino
yeokm1
 
PPTX
Temperature Controller with Atmega16
Siddhant Jaiswal
 
PDF
Automatic room temperature controlled fan using arduino uno microcontroller
Mohammod Al Emran
 
PPTX
Home automation
Rupshanker Mishra
 
PDF
Lm35
Atul Uttam
 
PDF
Control Fan AC With LM-35 Sensor Based Arduino
Anjar setiawan
 
PPTX
HEALTH MONITORING SYSTEM using mbed NXP LPC11U24
Jigyasa Singh
 
PDF
Lm 35
Makers of India
 
PPTX
131080111003 mci
jokersclown57
 
PDF
Lm35
Sameer Farooq
 
PPTX
Digital Notice Board
Raaki Gadde
 
Temperature Sensor
EnricVentosa
 
CONTROL FAN AC USING TEMPERATURE SENSOR LM35 BASED ON ARDUINO UNO
Susanti Arianto
 
A 64-by-8 Scrolling Led Matrix Display System
Samson Kayode
 
5x7 matrix led display
Vatsal N Shah
 
Automatic DC Fan using LM35 (english version)
Nurlatifa Haulaini
 
Moving message display
viraj1989
 
Arduino Workshop
atuline
 
Catalogo unitronics 2012_intrave
INTRAVE IndustrialAutomation
 
8x8 dot matrix(project)
Shahrin Ahammad
 
Introduction to Arduino
yeokm1
 
Temperature Controller with Atmega16
Siddhant Jaiswal
 
Automatic room temperature controlled fan using arduino uno microcontroller
Mohammod Al Emran
 
Home automation
Rupshanker Mishra
 
Control Fan AC With LM-35 Sensor Based Arduino
Anjar setiawan
 
HEALTH MONITORING SYSTEM using mbed NXP LPC11U24
Jigyasa Singh
 
131080111003 mci
jokersclown57
 
Digital Notice Board
Raaki Gadde
 
Ad

Similar to Temperature sensor with a led matrix display (arduino controlled) (20)

PDF
Combine the keypad and LCD codes in compliance to the following requ.pdf
forwardcom41
 
PPTX
R tist
Atul Uttam
 
DOCX
7segment scetch
Bang Igo
 
PDF
硕士答辩Keynote
pemi hua
 
PPTX
Arduino by bishal bhattarai IOE, Pashchimanchal Campus Pokhara, Nepal
bishal bhattarai
 
PDF
Arduino uno basic Experiments for beginner
YogeshJatav7
 
PDF
Introduction to Arduino and Circuits
Jason Griffey
 
PPTX
Vechicle accident prevention using eye bilnk sensor ppt
satish 486
 
PPTX
Sensors and Actuators in Arduino, Introduction
BibekPokhrel13
 
PDF
Programming arduino makeymakey
Industrial Design Center
 
PPT
Intro2 Robotic With Pic18
Moayadhn
 
PDF
Arduino: Intro and Digital I/O
June-Hao Hou
 
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Indra Hermawan
 
PDF
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Indra Hermawan
 
PPTX
LED Cube Presentation Slides
Projects EC
 
TXT
PIC and LCD
hairilfaiz86
 
PDF
Arduino and Robotics
Mebin P M
 
DOCX
Direct analog
srikanthsailu
 
PPTX
Pemrograman Arduino 1
Dedi Supardi
 
DOCX
REPORT
Taimoor Tahir
 
Combine the keypad and LCD codes in compliance to the following requ.pdf
forwardcom41
 
R tist
Atul Uttam
 
7segment scetch
Bang Igo
 
硕士答辩Keynote
pemi hua
 
Arduino by bishal bhattarai IOE, Pashchimanchal Campus Pokhara, Nepal
bishal bhattarai
 
Arduino uno basic Experiments for beginner
YogeshJatav7
 
Introduction to Arduino and Circuits
Jason Griffey
 
Vechicle accident prevention using eye bilnk sensor ppt
satish 486
 
Sensors and Actuators in Arduino, Introduction
BibekPokhrel13
 
Programming arduino makeymakey
Industrial Design Center
 
Intro2 Robotic With Pic18
Moayadhn
 
Arduino: Intro and Digital I/O
June-Hao Hou
 
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Indra Hermawan
 
L6 Visual Output LED_7SEGMEN_LEDMATRIX upate.pdf
Indra Hermawan
 
LED Cube Presentation Slides
Projects EC
 
PIC and LCD
hairilfaiz86
 
Arduino and Robotics
Mebin P M
 
Direct analog
srikanthsailu
 
Pemrograman Arduino 1
Dedi Supardi
 
Ad

Recently uploaded (20)

PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 

Temperature sensor with a led matrix display (arduino controlled)

  • 1. Arduino Final Project By: Mhmoud Salama. Hussam Hamdy.
  • 2. Main Project • To make a temperature sensor that outputs the reading as a scrolling message on a LED matrix. • We used a LED matrix which is a common anode 8x8 display. • Wired on breadboards.
  • 3. Main Concept • Use of two shift registers (2x 74HC595) to pass the encoded-charachter data serially from the arduino as a parallel output to the rows and Columns of an 8x8 LED matrix. • The arduino handles the scrolling of the message and the periodic time-multiplexing of rows and columns (refresh rate = 100Hz), using a periodic interrupt, to which the function “screenUpdate” is attached. • So , we calibrated the sensor using a potentiometer through the serial monitor window. • then the complete circuit is connected.
  • 5. 74HC595-Shift Registers -- An 8-bit shift register with Serial to parallel capability. -- We use two of them, Each one controlling eight rows/columns.
  • 6. LM335-Temperature Sensor • Calibration: -- We connect the calibration circuit , and connected it’s output as an analogue input to the arduino. -- With a potentiometer, and a small code... we used the serial monitor of arduino to fine-tune the sensor to give an acceptable reading (28 C for average room temperature).
  • 7. CODE • #include <TimerOne.h> • #include <charEncodings.h> // Each charachter and it’s (8x8 LED matrix)-mapped code. • // BASIC PIN CONFIGURATION • // AND DECLARATIONS • //Pin connected to Pin 12 of 74HC595 (Latch) • int latchPin = 8; • //Pin connected to Pin 11 of 74HC595 (Clock) • int clockPin = 12; • //Pin connected to Pin 14 of 74HC595 (Data) • int dataPin = 11; • // pin for the potentiometer to control the scrolling speed • int potPin = 5; • // pin for reading the temperature • int tempPin = 4; • // this is the gobal array that represents what the matrix • // is currently displaying • uint8_t led[8];
  • 8. CODE • void setup() • { //set pins to output • pinMode(latchPin, OUTPUT); • pinMode(clockPin, OUTPUT); • pinMode(dataPin, OUTPUT); • pinMode(potPin, INPUT); • pinMode(tempPin, INPUT); • analogReference(INTERNAL); • // attach the screenUpdate function to the interrupt timer • // Period=10,000micro-second /refresh rate =100Hz • Timer1.initialize(10000); • Timer1.attachInterrupt(screenUpdate); • }
  • 9. CODE • //Continuous LOOP • void loop() • { • long counter1 = 0; • long counter2 = 0; • char reading[10]; • char buffer[18]; • if (counter1++ >=100000) { • counter2++; • } • if (counter2 >= 10000) { • counter1 = 0; • counter2 = 0; • } getTemp(reading); displayScrolledText(reading); }
  • 10. The (displayScrolledText ) Function • void displayScrolledText(char* textToDisplay) • { • int textLen = strlen(textToDisplay); • char charLeft, charRight; • // scan through entire string one column at a time and call • // function to display 8 columns to the right • for (int col = 1; col <= textLen*8; col++) • { • • // if (col-1) is exact multiple of 8 then only one character • // involved, so just display that one • if ((col-1) % 8 == 0 ) • { • char charToDisplay = textToDisplay[(col-1)/8]; • • for (int j=0; j<8; j++) • { • led[j] = charBitmaps[charToDisplay][j]; • } • } • else • { • int charLeftIndex = (col-1)/8; • int charRightIndex = (col-1)/8+1; • charLeft = textToDisplay[charLeftIndex];
  • 11. • // check we are not off the end of the string • if (charRightIndex <= textLen) • { • charRight = textToDisplay[charRightIndex]; • } • else • { • charRight = ' '; • } • setMatrixFromPosition(charLeft, charRight, (col-1) % 8); • } • int delayTime = analogRead(potPin); • delay (delayTime); • } •}
  • 12. void shiftIt(byte dataOut) { • // Shift out 8 bits LSB first, • // on rising edge of clock • boolean pinState; • //clear shift register read for sending data • digitalWrite(dataPin, LOW); • // for each bit in dataOut send out a bit • for (int i=0; i<=7; i++) { • //set clockPin to LOW prior to sending bit • digitalWrite(clockPin, LOW); • // if the value of DataOut and (logical AND) a bitmask • // are true, set pinState to 1 (HIGH) • if ( dataOut & (1<<i) ) { • pinState = HIGH; • } • else { • pinState = LOW; • } • //sets dataPin to HIGH or LOW depending on pinState • digitalWrite(dataPin, pinState); • //send bit out on rising edge of clock • digitalWrite(clockPin, HIGH); • digitalWrite(dataPin, LOW); • }
  • 13. • //stop shifting • digitalWrite(clockPin, LOW); • } • boolean isKeyboardInput() { • // returns true is there is any characters in the keyboard buffer • return (Serial.available() > 0); • } • } • // terminate the string • readString[index] = '0'; • }
  • 14. void setMatrixFromPosition(char charLeft, char charRight, int col) { • // take col left most columns from left character and bitwise OR with 8-col from • // the right character • for (int j=0; j<8; j++) { • led[j] = charBitmaps[charLeft][j] << col | charBitmaps[charRight][j] >> 8-col; • } • } • void screenUpdate() { • uint8_t col = B00000001; • for (byte k = 0; k < 8; k++) { • digitalWrite(latchPin, LOW); // Open up the latch ready to receive data • shiftIt(~led[7-k]); • shiftIt(col); • digitalWrite(latchPin, HIGH); // Close the latch, sending the registers data to the matrix • col = col << 1; • } • digitalWrite(latchPin, LOW); • shiftIt(~0 ); • shiftIt(255); • digitalWrite(latchPin, HIGH); • }
  • 15. void getTemp(char* reading) { • int span = 20; • int aRead = 0; • long temp; • char tmpStr[10]; • // average out several readings • for (int i = 0; i < span; i++) { • aRead = aRead+analogRead(tempPin); • } • aRead = aRead / span; • temp = ((100*1.1*aRead)/1024)*10; • reading[0] = '0'; • itoa(temp/10, tmpStr, 10); • strcat(reading,tmpStr); • strcat(reading, "."); • itoa(temp % 10, tmpStr, 10); • strcat(reading, tmpStr); • strcat(reading, "C"); • }