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.
PDV_Driver.cpp
- Committer:
- peterjasinski
- Date:
- 2021-11-18
- Revision:
- 1:420ee7ee09ca
- Parent:
- 0:b74bf233f073
File content as of revision 1:420ee7ee09ca:
#include "PDV_Driver.h"
PDV::PDV(PinName in2):_in2(in2)
{
c1 = 100000;
c2 = 3.3;
}
float PDV::volts()
{
float volts=_in2.read()*3.3;
return volts;
}
float PDV::res()
{
float res=_in2.read()*3.3;
float R=(c2*((c1/res))-c1);
return R;
}