Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetNetIf mbed
SensorMCP9700.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 "SensorMCP9700.h" 00009 00010 SensorMCP9700::SensorMCP9700(PinName pin) : analogInput(pin) {} 00011 SensorMCP9700::~SensorMCP9700() {} 00012 double SensorMCP9700::read() { 00013 /* 00014 * The value range of analogInput.read() is 0.0 to 1.0. 00015 */ 00016 return (((analogInput.read() * 3.3) - 0.5) * 100.0); 00017 }
Generated on Fri Jul 15 2022 13:35:45 by
1.7.2