ThermistorPack.

Dependents:   Pachube_TestProgram ThermistorPack_TestProgram _DearMrJeffMourich StarBoardOrangeExpansion2 ... more

Committer:
shintamainjp
Date:
Fri Sep 17 23:42:46 2010 +0000
Revision:
0:ac6a05fefa2f
Child:
1:4f84f03b1703

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shintamainjp 0:ac6a05fefa2f 1 /**
shintamainjp 0:ac6a05fefa2f 2 * Sensor interface driver. (Version 0.0.1)
shintamainjp 0:ac6a05fefa2f 3 *
shintamainjp 0:ac6a05fefa2f 4 * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
shintamainjp 0:ac6a05fefa2f 5 * http://shinta.main.jp/
shintamainjp 0:ac6a05fefa2f 6 */
shintamainjp 0:ac6a05fefa2f 7
shintamainjp 0:ac6a05fefa2f 8 #include "ThermistorLM35.h"
shintamainjp 0:ac6a05fefa2f 9
shintamainjp 0:ac6a05fefa2f 10 ThermistorLM35::ThermistorLM35(PinName pin)
shintamainjp 0:ac6a05fefa2f 11 : analogInput(pin) {
shintamainjp 0:ac6a05fefa2f 12 }
shintamainjp 0:ac6a05fefa2f 13
shintamainjp 0:ac6a05fefa2f 14 ThermistorLM35::~ThermistorLM35() {
shintamainjp 0:ac6a05fefa2f 15 }
shintamainjp 0:ac6a05fefa2f 16
shintamainjp 0:ac6a05fefa2f 17 double ThermistorLM35::read() {
shintamainjp 0:ac6a05fefa2f 18 /*
shintamainjp 0:ac6a05fefa2f 19 * The value range of analogInput.read() is 0.0 to 1.0.
shintamainjp 0:ac6a05fefa2f 20 */
shintamainjp 0:ac6a05fefa2f 21 return ((analogInput.read() * 3.3) * 100.0);
shintamainjp 0:ac6a05fefa2f 22 }