Hi. This is the feed program for Cosm. (The previous name of the services is Pachube.)

Dependencies:   mbed ThermistorPack Pachube ConfigFile EthernetNetIf TextLCD HTTPClient_ToBeRemoved FatFileSystem SDFileSystem

mylib/ThermistorPack/ThermistorMCP9701.cpp

Committer:
shintamainjp
Date:
2012-08-06
Revision:
0:521ba375aa0f

File content as of revision 0:521ba375aa0f:

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

#include "ThermistorMCP9701.h"

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

ThermistorMCP9701::~ThermistorMCP9701() {
}

double ThermistorMCP9701::read() {
    /*
     * The value range of analogInput.read() is 0.0 to 1.0.
     */
    return (((analogInput.read() * 3.3) - 0.400) / 0.0195);
}