Smiling Termometer

Smile Termometer

This example shows you how to realize a sample tempermometer using an Industrial 101 board. 

Arduino Industrial 101 

In this project it is used as Temperature Sensor the TMP36. You can download the datasheet here

TMP 36: temperature sensor 

This sensor has three pins: Vs, Vout and GND and it outputs 10 millivolts per degree centigrade on the signal PIN. 
It is possible measuring temperatures below freezing thanks to a 500 mV offset (for example 25 degrees C = 750 mV, 0degrees C = 500mV). 
The mesureted value is converted in Celsius degrees and shown in a little oled display assembled on Arduino Industrial 101. 

Oled display

Hardware

  • Arduino Industrial 101 board
  • DogOled
  • Mini breadboard (opzional)
  • A bunch of wires (male and female)
  • Temperature Sensor (TMP36) (x1)

Circuit

Follow these steps for realizing the circuit: 
- Assembly the DogOled on the Arduino Industrial 101 paying attention to insert it how shown in the picture: 

Assembly oled display on Arduino Industrial 101 1/2 Assembly oled display on Arduino Industrial 101 2/2 

- Put the temperature sensor in the minibreadboard or use three wires female/male and connect them so: 
1)Connect the VS pin of sensor (first pin of TMP36) to 5V pin of board. 
2)Connect the VOUT pin of sensor (second pin of TMP36) to analog A0 pin of board. 
3)Connect the GND pin of sensor (thrid pin of TMP36) to GND of board. 

smiling thermometer circuit

- Connect the board to PC. 
Now the circuit is ready. 
Upload the sketch!

Code

The sketch uses a modified Adafruit library to communicate with the oled display. 
You can downlod it here
This sketch allows to visualize on a little diplay the temperature in Celsius degrees and associates a nice face. 
The images inserted in this sketch are been converted using Image2Code. 
You can download it here.

The complete code and its detailed description are shown down.

 
 
//include libraries
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
//define for Arduino Industrial 101
#define OLED_RESET 4
Adafruit_SSD1306 display(OLED_RESET);
#define NUMFLAKES 10
#define XPOS 0
#define YPOS 1
#define DELTAY 2
//check the dimension of display
#if(SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif
//picture: logo Arduino
const unsigned char PROGMEM arduino[] = {0xff,0xff,0xff,0xff,0xff,0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0xff,
0xff,0xe0,0x1f,0xfc,0x1f,0xf8,0x7,0xff,
0xff,0xe0,0xf,0xf0,0xf,0xf0,0x7,0xff,
0xff,0xf0,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf0,0x0,0x0,0x0,0x0,0xf,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0x1f,0xff,
0xff,0xf8,0x0,0x0,0x0,0x0,0x1f,0xff,
0xff,0xfc,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xfe,0x0,0x0,0x0,0x0,0x3f,0xff,
0xff,0xfe,0x0,0x0,0x0,0x0,0x7f,0xff,
0xff,0xff,0x0,0x0,0x0,0x0,0xff,0xff,
0xff,0xff,0x80,0x0,0x0,0x1,0xff,0xff,
0xff,0xff,0xc0,0x0,0x0,0x3,0xff,0xff,
0xff,0xff,0xf0,0x0,0x0,0x7,0xff,0xff,
0xff,0xff,0xf8,0x0,0x0,0x1f,0xff,0xff,
0xff,0xff,0xfe,0x0,0x0,0x7f,0xff,0xff,
0xff,0xff,0xff,0xc0,0x3,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xfd,0xff,0xff,0xdf,0xff,
0xff,0xf1,0x82,0x9,0x90,0x4d,0x87,0xff,
0xff,0xf1,0x9a,0x65,0x9d,0xc5,0x37,0xff,
0xff,0xf4,0x92,0x65,0x9d,0xc5,0x73,0xff,
0xff,0xe4,0x86,0x65,0x9d,0xd1,0x73,0xff,
0xff,0xe0,0x92,0x65,0x9d,0xd9,0x77,0xff,
0xff,0xee,0x9a,0xc,0x10,0xd9,0x7,0xff,
0xff,0xee,0xdb,0x3e,0x30,0x5d,0x8f,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff
};
//picture: smile face
const unsigned char PROGMEM smile[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xe0,0x1,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0x1f,0xfe,0x3f,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xf9,0xff,0xff,0xc7,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xf7,0x1f,0xf8,0x1,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xc0,0xf,0xf0,0x4,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xa0,0xf,0xf0,0x6,0x7f,0xff,0xff,0xf8,
0xff,0xfb,0xff,0x60,0x3f,0xff,0x7,0x3f,0xff,0xff,0xf8,
0xf9,0xf9,0xfe,0xf3,0xff,0xff,0xff,0x9f,0xff,0xff,0xf8,
0xfd,0xf1,0xfd,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xf8,
0xf8,0xc3,0xfb,0xff,0xff,0xff,0xdf,0xe7,0xff,0xff,0xf8,
0xe1,0xe7,0xf7,0xff,0xff,0xff,0xe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0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8
};
//picture: sad face
const unsigned char PROGMEM sad[] = {
0xff,0xff,0xff,0xff,0x80,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,
0xff,0xff,0xff,0xf0,0x36,0x0,0xff,0xff,0xff,0xff,0xff,0xe0,
0xff,0xff,0xff,0x8f,0xff,0xc0,0x7f,0xff,0xff,0xff,0xff,0xe0,
0xff,0xff,0xfc,0x7f,0xff,0x87,0x1f,0xff,0xff,0xff,0xff,0xe0,
0xff,0xff,0xf8,0x7f,0xff,0xcf,0x87,0xff,0xff,0xff,0xff,0xe0,
0xff,0xff,0xe0,0x3f,0xff,0xff,0x93,0xff,0xff,0xff,0xff,0xe0,
0xcf,0xff,0xc3,0x87,0xff,0xe1,0xd8,0xff,0xff,0xff,0xff,0xe0,
0xcf,0xff,0x27,0xcf,0xff,0xde,0xfe,0x7f,0xff,0xff,0xff,0xe0,
0xed,0xfe,0x4f,0xff,0xff,0xbf,0x7f,0x3f,0xff,0xff,0xff,0xe0,
0xfd,0xfc,0xdf,0x7f,0xff,0x7f,0xbf,0x9f,0xff,0xff,0xff,0xe0,
0xff,0xf9,0x9c,0x9f,0xff,0x7f,0xbf,0xcf,0xff,0xff,0xff,0xe0,
0xff,0xf3,0xbb,0xef,0xfe,0xff,0xdf,0xe7,0xff,0xff,0xff,0xe0,
0x9b,0xe7,0xb7,0xf7,0xfe,0x81,0xdf,0xf3,0xff,0xff,0xff,0xe0,
0x9f,0xef,0xff,0xfb,0xfe,0x38,0x5f,0xfb,0xff,0xff,0xff,0xe0,
0x9f,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fc,0xff,0xe0,
0xfb,0xff,0xff,0xff,0xff,0xf3,0xcf,0xff,0xff,0xfc,0xff,0xe0,
0xfb,0xff,0xff,0xf3,0xff,0xe7,0xcf,0xc0,0xff,0xf9,0xff,0xe0,
0xfb,0xff,0xff,0xf1,0xff,0xc7,0xcf,0x8e,0x3f,0xf9,0xff,0xe0,
0xf9,0xff,0xff,0xfc,0x7f,0x8f,0xce,0x7f,0x9f,0xf1,0xff,0xe0,
0xf9,0xff,0xff,0xfe,0x1e,0x1f,0x9e,0xff,0xcf,0xf0,0xff,0xe0,
0xf9,0xff,0xff,0xff,0x80,0x7f,0x9c,0xff,0xef,0xe0,0x7f,0xe0,
0xf9,0xff,0xff,0xff,0xe1,0xff,0x9d,0xe7,0xe7,0xe0,0x3f,0xe0,
0xfc,0xff,0xff,0xff,0xff,0xff,0x99,0xe4,0xf7,0xe0,0x3,0xe0,
0xfc,0xff,0xff,0xff,0xff,0xff,0x39,0xbc,0xf7,0xc6,0x38,0xe0,
0xfc,0xff,0xff,0xff,0xff,0xff,0x39,0xbf,0xf7,0xcf,0x7e,0x60,
0xfe,0x7f,0xff,0xff,0xff,0xff,0x39,0x9f,0x77,0xce,0x7f,0xa0,
0xfe,0x7f,0xff,0xff,0xff,0xfe,0x7d,0xc4,0xe7,0x9e,0x9f,0xc0,
0xff,0x3f,0xff,0xff,0xff,0xfe,0x7c,0xe1,0xef,0x9f,0xf3,0xc0,
0xff,0x3f,0xff,0xff,0xff,0xfe,0x7e,0xff,0xdf,0x9d,0xf9,0x80,
0xff,0x9f,0xff,0xff,0xff,0xfc,0xff,0x3f,0x1f,0x3a,0x7f,0xa0,
0xff,0x9f,0xff,0xff,0xff,0xfc,0xff,0x80,0x7f,0x3,0x9f,0xa0,
0xff,0xcf,0xff,0xff,0xff,0xfc,0xff,0xe1,0xff,0x3,0xef,0x20,
0xff,0xc7,0xff,0xff,0xff,0xf9,0xff,0xff,0xfe,0x0,0xff,0xa0,
0xff,0xe3,0xff,0xff,0xff,0xf9,0xff,0xff,0xfe,0x7,0x3f,0x60,
0xff,0xf1,0xff,0xff,0xff,0xf3,0xff,0xff,0xfe,0x57,0xfc,0xe0,
0xff,0xf8,0xff,0xff,0xff,0xf9,0xff,0xff,0xfe,0x1,0xfd,0xe0,
0xff,0xfc,0x7f,0xff,0xff,0xfc,0x7f,0xff,0xfe,0x1e,0x79,0xe0,
0xff,0xfe,0x3f,0xff,0xff,0xfe,0x1f,0xff,0xfc,0x3f,0x93,0xe0,
0xff,0xff,0xf,0xff,0xff,0xff,0x7,0xff,0xfc,0x1f,0xc7,0xe0,
0xff,0xff,0x87,0xff,0xff,0xff,0xe0,0x7f,0xfc,0xf,0xef,0xe0,
0xff,0xff,0xe1,0xff,0xff,0xff,0xc0,0x7,0xfc,0x7,0xdf,0xe0,
0xff,0xff,0xf0,0x7f,0xff,0xfe,0x7,0x80,0x0,0x8,0x1f,0xe0,
0xff,0xff,0xfc,0xf,0xff,0xf0,0x1f,0xe0,0x0,0x1f,0xff,0xe0,
0xff,0xff,0xff,0x0,0x3e,0x0,0x7f,0xf0,0x0,0x3f,0xff,0xe0,
0xff,0xff,0xff,0xe0,0x0,0x3,0xff,0xfc,0x0,0xff,0xff,0xe0,
0xff,0xff,0xff,0xff,0x0,0x7f,0xff,0xff,0x3,0xff,0xff,0xe0
};
//picture: sweaty face
const unsigned char PROGMEM sweaty[] = {
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,
0xff,0xff,0xfc,0x0,0xf,0xff,0xff,0x80,
0xff,0xff,0xe3,0xff,0xf1,0xff,0xff,0x80,
0xff,0xff,0x89,0x7f,0xbe,0x7f,0xff,0x80,
0xff,0xfe,0x27,0xdf,0xff,0x9f,0xff,0x80,
0xff,0xfc,0xff,0xbf,0xff,0xef,0xff,0x80,
0xff,0xf3,0xf3,0xbf,0xff,0xf3,0xff,0x80,
0xff,0xe7,0xe3,0x9f,0xff,0xf9,0xff,0x80,
0xff,0xcf,0xc7,0xcf,0xff,0xfe,0xff,0x80,
0xff,0x9f,0x87,0xe7,0xff,0xff,0x7f,0x80,
0xff,0x3e,0x17,0xc1,0xff,0xff,0x3f,0x80,
0xff,0x70,0x77,0xb8,0x7f,0xff,0xbf,0x80,
0xfe,0xfb,0xf3,0x3e,0x3f,0xff,0xdf,0x80,
0xfc,0xfb,0x3,0xf,0x7f,0xff,0xef,0x80,
0xfd,0xf2,0x46,0x7,0x7f,0xff,0xef,0x80,
0xfb,0xf5,0xe6,0x4b,0x3f,0xff,0xf7,0x80,
0xfb,0xf3,0xf6,0xfd,0x3f,0xff,0xf7,0x80,
0xf3,0xf7,0xf6,0xfc,0x37,0xff,0xfb,0x80,
0xf7,0xe7,0xee,0x7e,0x3f,0xff,0xfb,0x80,
0xf6,0x6f,0xee,0x7f,0x3f,0xff,0xfb,0x80,
0xf6,0x4f,0xde,0x7e,0x3f,0xff,0xfd,0x80,
0xef,0xc7,0x9f,0x1c,0x3f,0xff,0xfd,0x80,
0xef,0xc0,0x3f,0x80,0x7f,0xff,0xfd,0x80,
0xef,0xe0,0x7f,0xc0,0xff,0xff,0xfd,0x80,
0xef,0xf0,0xff,0xf9,0xff,0xff,0xfd,0x80,
0xef,0xff,0xe0,0xff,0xff,0xff,0xfd,0x80,
0xef,0xff,0xbf,0x3f,0xff,0xff,0xfd,0x80,
0xef,0xff,0x3f,0xdf,0xff,0xff,0xfd,0x80,
0xef,0xfe,0xf,0xef,0xff,0xff,0xfd,0x80,
0xef,0xfc,0x0,0x7,0xff,0xff,0xfd,0x80,
0xef,0xe4,0x0,0x2,0xff,0xff,0xfd,0x80,
0xe7,0xf4,0x0,0x0,0xff,0xff,0xfd,0x80,
0xf7,0xf8,0x0,0x1,0xff,0xff,0xf9,0x80,
0xf7,0xf0,0x0,0x0,0xff,0xff,0xfb,0x80,
0xf7,0xf8,0x0,0x0,0xff,0xff,0xfb,0x80,
0xfb,0xf8,0x0,0x0,0x7f,0xff,0xfb,0x80,
0xfb,0xf8,0x0,0x0,0x7f,0xff,0xf7,0x80,
0xfd,0xf8,0x0,0x0,0x7f,0xff,0xe7,0x80,
0xfd,0xf8,0x0,0x0,0x3f,0xff,0xef,0x80,
0xfe,0xd8,0x0,0x0,0x3f,0xff,0xdf,0x80,
0xfe,0x78,0x0,0x0,0x3f,0xff,0xdf,0x80,
0xff,0x38,0x0,0x0,0x3f,0xff,0xbf,0x80,
0xff,0xb8,0x0,0x0,0x3f,0xff,0x7f,0x80,
0xff,0xd8,0x0,0x18,0x3f,0xfe,0xff,0x80,
0xff,0xe8,0x0,0x1e,0x3f,0xfd,0xff,0x80,
0xff,0xf0,0x0,0x1f,0x3f,0xfb,0xff,0x80,
0xff,0xf8,0x0,0x1f,0xff,0xe7,0xff,0x80,
0xff,0xf8,0x0,0x1f,0xff,0xcf,0xff,0x80,
0xff,0xf8,0x0,0xf,0xfe,0x3f,0xff,0x80,
0xff,0xf8,0x0,0xf,0xf8,0xff,0xff,0x80,
0xff,0xf8,0x0,0x8,0x7,0xff,0xff,0x80,
0xff,0xf8,0x0,0x40,0x7f,0xff,0xff,0x80,
0xff,0xf8,0x0,0x7f,0xff,0xff,0xff,0x80,
0xff,0x80,0x0,0x7f,0xff,0xff,0xff,0x80,
0xfe,0x0,0x0,0x7f,0xff,0xff,0xff,0x80,
0xf8,0x0,0x0,0x7f,0xff,0xff,0xff,0x80,
0xf0,0x0,0x6,0x7f,0xff,0xff,0xff,0x80,
0xf0,0x0,0x8,0xff,0xff,0xff,0xff,0x80,
0xf0,0x0,0x40,0xff,0xff,0xff,0xff,0x80,
0xf0,0x0,0x3,0xff,0xff,0xff,0xff,0x80,
0xfc,0x0,0xf,0xff,0xff,0xff,0xff,0x80,
0xff,0x83,0xff,0xff,0xff,0xff,0xff,0x80,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80
 
};
//define variable
const int sensorPin = A0;
//setup
void setup()   {              
// by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
display.begin(SSD1306_SWITCHCAPVCC, 0x3C); // initialize with the I2C addr 0x3D (for the 128x64)
display.display();//enables the display
delay(2000);//wait 2 seconds
display.clearDisplay();//clear display
display.drawBitmap(32, 0, arduino, 64, 64, WHITE);//print logo Arduino
display.display();//enable the print on display
delay(2000);//wait 2 seconds
}
//loop
void loop() {
int sensorVal = analogRead(sensorPin);//read sensor value
float voltage = (sensorVal / 1024.0) * 5.0;//convert the value in voltage
float temperature = (voltage - .5) * 100;//convert the value in Celsius degree
display.setTextSize(2);//size text
display.setTextColor(WHITE);//color text
display.setCursor(0,0);//position text
display.clearDisplay();//clear display
display.println("Temperature(C):");//print the label: Temperature(C):
display.println(temperature);//print the temperature value
display.display();//enable the print on display
delay(2000);//wait 2 seconds
//check the sensor value if the temperature is <20°C print the sad face
  if (temperature < 20) {
display.clearDisplay();
display.drawBitmap(19, 0, sad, 91, 64, WHITE);
display.display();
delay(2000);
display.clearDisplay();
}
//check the sensor value if the temperature is >20°C and <30°C print the smiley face
else if (temperature >= 20 && temperature < 30 ) {
  display.clearDisplay();
  display.drawBitmap(22, 0, smile, 85, 64, WHITE);
  display.display();
delay(2000);
}
//check the sensor value if the temperature is >30°C print the sweaty face
else if (temperature >= 30) {
  display.clearDisplay();
  display.drawBitmap(36, 0, sweaty, 57, 64, WHITE);
  display.display();  
  delay(2000);
}
delay(1000);//wait 1 second
}
 
 

Preview sketch

- Initialization display with Arduino logo 
Smiling thermometer preview 1/7 
- If the temperature is < 20 °C it is shown this face: 
Smiling thermometer preview 2/7 Smiling thermometer preview 3/7 
- Instead if the temperature is >=20°C and < 30 °C it is shown a smiley face: 
Smiling thermometer preview 4/7 Smiling thermometer preview 5/7 
- Finally if the temperature is >= 30 °C it is shown this sweaty face: 
Smiling thermometer preview 6/7 Smiling thermometer preview 7/7

NOTE: 
The Arduino Industrial 101 images could differ from the real board.