Jayraj Desai
Published © CC BY-NC-SA

An Adequate Thermometer

An adequate tool to keep in your First aid kit.

IntermediateFull instructions provided3 hours6,412
An Adequate Thermometer

Things used in this project

Hardware components

Arduino Pro Mini 328 - 3.3V/8MHz
SparkFun Arduino Pro Mini 328 - 3.3V/8MHz
×1
SparkFun FTDI Basic Breakout - 3.3V
SparkFun FTDI Basic Breakout - 3.3V
×1
Temperature Sensor
Temperature Sensor
×1
128x64 Graphic OLED display
×1
Coin Cell Battery CR2032
Coin Cell Battery CR2032
×2
Coin Cell Battery Holder
Coin Cell Battery Holder
×2

Software apps and online services

Arduino IDE
Arduino IDE
LCD assistant

Story

Read more

Schematics

Programming Arduino pro mini with FTDI FT232RL

schematic for final assembly

Schematic To indicate where you can insert switch

Code

Code

Arduino
#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(13, 11, 10, 9, 8);  
String str ;

const uint8_t therm_bitmap[] = {
0x00, 0x00, 0x03, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x7C, 0x0F, 0x80, 0x00, 0x00, 0x01, 0xE0, 0x01,
0xE0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x01,
0x80, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x00, 0x60, 0x00,
0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF,
0xE0, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x01,
0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xE0, 0x00,
0x00, 0x01, 0xFF, 0xFF, 0xE0, 0x00, 0x00, 0x01, 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1F, 0xFF, 0xFF, 0xFE, 0x00,
0x00, 0x00, 0x7F, 0xFF, 0x80, 0x00, 0x02, 0x02, 0x02, 0x01, 0x04, 0x02, 0x02, 0x03, 0x00, 0x03,
0x00, 0x00, 
};

const int LM35Pin = A0;
unsigned long sensorData;
float tempData;

void draw(void)
{
  u8g.drawBitmap( 76,5,6,50,therm_bitmap); 
  u8g.setFont(u8g_font_unifont);
  u8g.drawStr(0,15,"Temp: ");
  u8g.setPrintPos(22,40);
  u8g.print(tempData);
  u8g.drawStr(65,40,"c");
}

void setup(void){
  analogReference(INTERNAL);
  Serial.begin(9600);
}

void loop(void) {
  sensorData = analogRead(LM35Pin);
  tempData = (float)sensorData/(9.31);
  Serial.println(sensorData);
  Serial.print((float)tempData,2);
  Serial.println();
  // picture loop
  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );
  
  // rebuild the picture after some delay
  delay(1000);
}

Credits

Jayraj Desai

Jayraj Desai

10 projects • 70 followers
Just a Hobbyist, trying things

Comments