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:
- 2:7b9d20c715f5
- Parent:
- 1:460124e3da18
--- a/PVD_Driver.cpp Thu Nov 11 23:03:49 2021 +0000 +++ b/PVD_Driver.cpp Sat Nov 13 20:10:19 2021 +0000 @@ -2,8 +2,8 @@ PVD::PVD(PinName in1): _in1(in1) { - R=10000; - V=3.3; + R=10000; + V=3.3; } float PVD::Res() @@ -12,3 +12,8 @@ float res=((R/volt)-V)/1000; return res; } +float PVD::Volt() +{ + float volt=_in1.read()*3.3; + return volt; +} \ No newline at end of file