Internet of Things: Temperature Sensor

Using the Esplora Arduino means you have a bunch of sensors built into the board.  One of these is the Temperature Sensor.  Now I am using code directly for the Arduino.cc page.

The Code will return, in the serial window presented by VisualMicro will look like the following.  If you put your finger on the temperature sensor, it will increase in value.  If you want to cool it down, then put some ice in a leakproof plastic bag and touch it to the sensor carefully.  The esplora, unlike the lilypad arduino is not waterproof.  I have included the code from: https://arduino.cc/en/Tutorial/EsploraTemperatureSensor , you might note that the esplora.h file will throw exceptions that don’t make sense, this is likely because you added a floating string in your code. 

image

Reading the temperature

In the Esplora.h there is variables that set the channels for the temperature and how the degrees are presented.  If you think about it, this would be an excellent temperature processing system for a long term cyro device to store babies eggs right?  Sensors have ranges of accuracies, so for Cryo you would have to check the specifications to see if the temperature sensor works at that low of temperature.  Or like the Thermometers used before the idea of electronic monitoring, which were created using hand blown tubes and mercury with humans doing the reading, were not very accurate.  This means that those thermometers definitely did not have the ability to be more accurate than 1 degree of precision.  The transistor or diode based thermometers might not be any more accurate, that is up to you or the sensor engineer, usually an electrical engineer but could be mechanical to pick the device and advise you as to what the software should do to auto-calibrate the sensor. 

Or you could get to pick the temperature sensor for the cryo storage system.   Good luck with any law suits…:)

In a later blog, I will discuss how to put this into the Azure cloud.

/*
  Esplora Temperature Sensor
This  sketch shows you how to read the Esplora's temperature sensor
You can read the temperature sensor in Farhenheit or Celsius.
Created on 22 Dec 2012
by Tom Igoe
This example is in the public domain.
*/
#include <Esplora.h>
void setup()
{
Serial.begin(9600); // initialize serial communications with your computer
}
void loop()
{
// read the temperature sensor in Celsius, then Fahrenheit:
int celsius = Esplora.readTemperature(DEGREES_C);
int fahrenheit = Esplora.readTemperature(DEGREES_F);
// print the results:
Serial.print("The Ambient Temperature is: ");
Serial.print(celsius);
Serial.print(" Celsius, or ");
Serial.print(fahrenheit);
Serial.println(" Fahrenheit.");
// wait a second before reading again:
delay(1000);
}