fantast -

, categorized under: esp8266 programming

Calculating Temperatures from IKEA Fantast meat thermometer measurements.

For a forthcoming IoT project I made a small c program to calclate temperatures from the Sensor that comes with that particular thermometer.

The calculation is based on .


#include <math.h>
#include <stdlib.h>
#include <stdio.h>
double Temp;
double lnTemp;
int mess;

//Ikea FANTAST Steinhart-Hart values

double a = 0.0012555249;
double b = 0.00015671315;
double c = 0.00000032210954;

int main(int argc, char *argv[]){

  mess = atoi(argv[1]);
  lnTemp = log(mess);
  Temp = 1 / (a + (b * lnTemp) + (c * lnTemp * lnTemp * lnTemp));
  //make it celsius
  Temp = Temp  - 273.15;
  printf("Temperature: %f", Temp);

Build it

gcc -o fantast fantast.c


fantast measurement_in_ohm

For example ( 60kOHM, should be around 20°Celsius):

fantast 60000

Plan is to build a WiFi temperature logger with an ESP8266.