×

SparkFun Electronics will be closed on July 3rd, 2015 in observance of Independence Day. Any orders placed after 2:00pm MT on July 2nd will be shipped out after the weekend. Thanks!

ese_kbron

Member Since: August 5, 2011

Country: United States

Profile

Spoken Languages

English, Spanish

  • Here’s the code for measuring temperature with Arduino for those who need it.
    I’m measuring the voltage drop across the thermistor instead of the 10K resistor.
    remember to include the math.h library
    5v|—|10kOhms|—|—-|Thermistor|—-|GND
    A0
    float ts1 = analogRead(A0);
    ts1 = ts1 * 5 / 1023;
    ts1 = ts1/((5 - ts1)/10000);
    ts1 = 1 / ((.003354016)+(.0002569850(log(ts1/10000)))+(.000002620131(pow((log(ts1/10000)),2)))+(.00000006383091*(pow((log(ts1/10000)),3))));
    ts1 = ts1 - 273.15;
    Serial.print(“Sensor 1 Temperature = ”);
    Serial.print(ts1);
    Serial.println(“ Celcius ”);

No public wish lists :(