top of page
Search

Arduino based Temperature Sensor

  • RaviKumar Uthirapathy
  • Jul 5, 2020
  • 1 min read

Hardware Requirments

  1. Arduino uno/Nano

  2. oled display SSD1306 - 7 pin

  3. MLX90614 Temperature Sensor

Knowledge Requirements

  1. Arduino IDE programming

  2. Basic Soldering




Step 1: Connect circuit as per diagram shown in above

Step 2: Copy paste Arduino code on IDE and upload to Arduino. Before that add sparkfun mlx90614 and adafruit oledssd1306 or for some .... made oled display use u8g2 library.


#include <Wire.h>

#include <SparkFunMLX90614.h>

#include <U8x8lib.h>

#include <SPI.h>

#ifdef U8X8_HAVE_HW_SPI

#include <SPI.h>


IRTherm therm;


U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 8, /* dc=*/ 9, /* reset=*/ 10);

void setup()

{

Serial.begin(9600);

therm.begin();

therm.setUnit(TEMP_C);

u8x8.begin();

u8x8.setFont(u8x8_font_px437wyse700a_2x2_r);

u8x8.drawString(0, 0, " BODY ");

u8x8.setFont(u8x8_font_px437wyse700b_2x2_r);

u8x8.drawString(0, 2, " TEMP ");

u8x8.setFont(u8x8_font_px437wyse700a_2x2_r);

u8x8.drawString(0, 4, " READER ");

u8x8.refreshDisplay(); // only required for SSD1606/7

delay(2000);

}


void loop()

{

String temperature;

char runner;

if (therm.read()) // On success, read() will return 1, on fail 0.

{

temperature = String(therm.object(), 2);

u8x8.print("Object: ");

u8x8.print(temperature); Serial.println("C");

//display.clearDisplay();

u8x8.refreshDisplay();

runner++;

delay(5);

}


if (therm.object()>=100)

u8x8.setFont(u8x8_font_px437wyse700b_2x2_r);

u8x8.setCursor(0,2);

//u8x8.println(temparature);

u8x8.setFont(u8x8_font_px437wyse700b_2x2_r);

u8x8.setCursor(0,4);

u8x8.println("deg C");

u8x8.refreshDisplay();


if (runner>20)

runner=0;

}

 
 
 

Recent Posts

See All
Facial Recognition in Live camera

FACIAL RECOGNITION USING PYTHON AND OPENCV WITH LIVE CAMERA FEED In this article, I will explain the how facial recognition system...

 
 
 
Locked home monitoring system

LOCKED HOME MONITORING SYSTEM Our neighboring state has implemented the locked home monitoring system in past few years. It was...

 
 
 
Solar powered 4G IP Camera

Now a day, The CCTV cameras are essential for surveillance and monitoring of places. But many of our CCTV systems installed at public...

 
 
 

Comments


Post: Blog2_Post
  • Facebook
  • Twitter
  • LinkedIn

©2020 by VOIP Server. Proudly created with Wix.com

bottom of page