#include <Arduino.h>

double ohm_to_celsius(float measurement, int temp_range_step)
{
  int lower_bin_edge = (int) measurement % temp_range_step;
  return 0.0;
}

double floatmap(float x, float in_min, float in_max, float out_min, float out_max)
{
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

float readTemperature()
{
  int temp = analogRead(A0);
  float ohm = (1000.0/3.3)*temp;
  return ohm;
}

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);

  int temp_range_start = 300;
  int temp_range_end = -55;
  int temp_range_step = 10;
  float tempistor_y[35] = {519910.0, 158090.0, 71668.0, 44087.0, 27936.0, 18187.0, 12136.0, 8284.0, 5774.0, 4103.0, 2967.0, 2182.0, 1629.0, 1234.0, 946.6, 735.5, 578.1, 459.4, 368.8, 298.9, 244.4, 201.6, 167.6, 140.4, 118.5, 100.7, 86.08, 74.05, 64.08, 55.75, 48.76, 42.87, 37.86, 33.59, 29.94 };
}

void loop() {
  // put your main code here, to run repeatedly:
}