David Escobar
Published © GPL3+

DIY Patient Thermometer for Healthcare Training

DIY thermometer, IR remote controlled. 9 different temperatures. For use in healthcare simulation training. Cost-effective solution.

IntermediateWork in progress2 hours1,354
DIY Patient Thermometer for Healthcare Training

Things used in this project

Hardware components

Adafruit TFT Featherwing 2.4"
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Adafruit Feather HUZZAH with ESP8266 WiFi
Adafruit Feather HUZZAH with ESP8266 WiFi
×1
Adafruit IR (Infrared) Receiver Sensor
×1
Adafruit Mini Remote Control
×1
Adafruit Black Nylon Screw Set
×1
Adafruit Lithium Ion Polymer Battery 1200mAh
×1
Adafruit Piezo Buzzer
×1

Software apps and online services

Arduino IDE
Arduino IDE

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Thermometer Face Plate

Thermometer Back Plate

Code

Thermometer Code

Arduino
#include <IRrecv.h>
#include <IRremoteESP8266.h>
#include <IRsend.h>
#include <IRtimer.h>
#include <IRutils.h>

#include <SPI.h>
#include <Adafruit_ILI9341.h> //for TFT LCD
#include <Adafruit_GFX.h>

#ifdef ESP8266
    #define STMPE_CS  16
    #define TFT_CS    0
    #define TFT_DC    15
    #define SD_CS     2
#endif
#ifdef __AVR_ATmega32U4__
   #define STMPE_CS 6
   #define TFT_CS   9
   #define TFT_DC   10
   #define SD_CS    5
#endif
#ifdef ARDUINO_SAMD_FEATHER_M0
   #define STMPE_CS 6
   #define TFT_CS   9
   #define TFT_DC   10
   #define SD_CS    5
#endif
#ifdef TEENSYDUINO
   #define TFT_DC   10
   #define TFT_CS   4
   #define STMPE_CS 3
   #define SD_CS    8
#endif
#ifdef ARDUINO_STM32_FEATHER
   #define TFT_DC   PB4
   #define TFT_CS   PA15
   #define STMPE_CS PC7
   #define SD_CS    PC5
#endif


Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);

int RECV_PIN = 4; //connect IR lead to Pin 4
IRrecv irrecv(RECV_PIN);

void setup() {
  Serial.begin(115200);
  delay(10);
  //start IR Receiver
  irrecv.enableIRIn();
  //Start LCD
  tft.begin();
  Serial.println("TFT Started");
  tft.fillScreen(ILI9341_BLACK);
  tft.setRotation(1);
  tft.setCursor(30,30);
  tft.setTextSize(3);
  tft.setTextColor(ILI9341_WHITE);
  tft.print("Thermometer");
  tft.setCursor(30,90);
  tft.print("Ready...");
  delay(3000);
  
  
}

void loop(){
  decode_results results;

  startScreen();

  if (irrecv.decode(&results)){
    serialPrintUint64(results.value, HEX);
    Serial.println("");
    irrecv.resume();
    if(results.value == 0xFD08F7){ //button 1
      oralTemp();
      tft.fillScreen(ILI9341_BLACK);
    }
    if(results.value == 0xFD8877){ //button 2
      rectalTemp();
      tft.fillScreen(ILI9341_BLACK);
    }
    if(results.value == 0xFD48B7){ //button 3
      oralTemp();
      delay(3000);
      tft.fillScreen(ILI9341_BLACK);
      tft.setCursor(30,30);
      tft.setTextSize(3);
      tft.setTextColor(ILI9341_WHITE);
      tft.print("ORAL TEMP: ");
      tft.setCursor(50,90);
      tft.setTextSize(4);
      tone(5,10000,500);
      tft.print("98.7 F"); //Set Temp Here
      delay(1000);
      noTone(5);
      delay(10000);
      tft.fillScreen(ILI9341_BLACK);
    }
    if(results.value == 0xFD28D7){ //button 4
      tft.fillScreen(ILI9341_BLACK);
      tft.setTextSize(ILI9341_WHITE);
      tft.setCursor(30,30);
      tft.setTextSize(3);
      tft.print("ORAL TEMP: ...");
      delay(5000);
      tft.setCursor(50,90);
      tft.setTextSize(4);
      tone(5,10000,500); //buzzer on 1/2 second
      tft.print("101.1 F"); //set temp here
      delay(1000);
      noTone(5); //turn tone off
      delay(3000);
      tft.fillScreen(ILI9341_BLACK);
    }
  }
}


void oralTemp(){
  tft.fillScreen(ILI9341_BLACK);
  tft.setCursor(30,30);
  tft.setTextSize(3);
  tft.setTextColor(ILI9341_WHITE);
  tft.print("ORAL TEMP: ...");
  delay(5000);
}
void rectalTemp(){
  tft.fillScreen(ILI9341_BLACK);
  tft.setCursor(30,30);
  tft.setTextSize(2);
  tft.setTextColor(ILI9341_WHITE);
  tft.print("RECTAL TEMP: ...");
  delay(5000);
}
//this is the home screen message
void startScreen(){
  tft.setCursor(30,30);
  tft.setTextSize(3);
  tft.setTextColor(ILI9341_WHITE);
  tft.print("Thermometer");
  tft.setCursor(30,90);
  tft.print("Ready...");
}

Credits

David Escobar

David Escobar

7 projects • 43 followers
Healthcare Simulation Specialist. 9+ years in healthcare.I have been actively involved with 3D printing and electronics for the past 2 years

Comments