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.
Diff: PVD_Driver.cpp
- Revision:
- 1:460124e3da18
- Child:
- 2:7b9d20c715f5
diff -r cc0c5534467e -r 460124e3da18 PVD_Driver.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PVD_Driver.cpp Thu Nov 11 23:03:49 2021 +0000 @@ -0,0 +1,14 @@ +#include "PVD_Driver.h" + +PVD::PVD(PinName in1): _in1(in1) +{ + R=10000; + V=3.3; +} + +float PVD::Res() +{ + float volt=_in1.read()*3.3; + float res=((R/volt)-V)/1000; + return res; +}