ThermistorPack.

Dependents:   Pachube_TestProgram ThermistorPack_TestProgram _DearMrJeffMourich StarBoardOrangeExpansion2 ... more

ThermistorLM60.cpp

Committer:
shintamainjp
Date:
2010-10-12
Revision:
1:4f84f03b1703
Parent:
0:ac6a05fefa2f

File content as of revision 1:4f84f03b1703:

/**
 * Thermistor interface driver. (Version 0.0.1)
 *
 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
 * http://shinta.main.jp/
 */

#include "ThermistorLM60.h"

ThermistorLM60::ThermistorLM60(PinName pin)
        : analogInput(pin) {
}

ThermistorLM60::~ThermistorLM60() {
}

double ThermistorLM60::read() {
    /*
     * The value range of analogInput.read() is 0.0 to 1.0.
     */
    return ((analogInput.read() * 3.3) - 0.424) / 0.00625;
}