Lucy Damon / PDV_Driver2
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PDV_Driver.cpp Source File

PDV_Driver.cpp

00001 #include "PDV_Driver.h"
00002 
00003 PDV::PDV(PinName in1): _in1(in1)
00004 {
00005     c1 = -1481.96;
00006     c2 = 2.1962+1000000.000;
00007     c3 = 1.8636;
00008     c4 = 3.88/1000000.000;
00009 
00010 }
00011 
00012 float PDV::photocell()
00013 {
00014     float photocell=_in1.read()*3.3;
00015     return photocell;
00016 
00017 }
00018 float PDV::resistance()
00019 {
00020     float resistance=_in1.read()*3.3;
00021     return resistance;
00022 
00023 }
00024 float PDV::volt()
00025 {
00026     float volt=_in1.read()*3.3;
00027     return volt;
00028 
00029 }