StarBoard Orange - Example application No.1 GoogleChartLogger with StarBoard Orange

Dependencies:   EthernetNetIf mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SensorLM35.cpp Source File

SensorLM35.cpp

00001 /**
00002  * Sensor interface driver. (Version 0.0.1)
00003  *
00004  * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
00005  * http://shinta.main.jp/
00006  */
00007 
00008 #include "SensorLM35.h"
00009 
00010 SensorLM35::SensorLM35(PinName pin) : analogInput(pin) {}
00011 SensorLM35::~SensorLM35() {}
00012 double SensorLM35::read() {
00013     /*
00014      * The value range of analogInput.read() is 0.0 to 1.0.
00015      */
00016     return ((analogInput.read() * 3.3) * 100.0);
00017 }