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: PowerMonlib2 mbed
Fork of TestPMLIB by
Revision 1:79b4bdf4997b, committed 2018-07-23
- Comitter:
- worasuchad
- Date:
- Mon Jul 23 13:08:53 2018 +0000
- Parent:
- 0:fbbd04cdb029
- Commit message:
- power monitoring for turtle bot
Changed in this revision
--- a/PowerMon.lib Fri Jun 15 02:46:31 2018 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -https://os.mbed.com/users/sippasaeng/code/PowerMonlib2/#7a6a568c5c34
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PowerMonlib2.lib Mon Jul 23 13:08:53 2018 +0000 @@ -0,0 +1,1 @@ +http://os.mbed.com/users/sippasaeng/code/PowerMonlib2/#7a6a568c5c34
--- a/main.cpp Fri Jun 15 02:46:31 2018 +0000
+++ b/main.cpp Mon Jul 23 13:08:53 2018 +0000
@@ -3,21 +3,19 @@
Serial pc(USBTX, USBRX); // tx, rx
-int main() {
-
- powerMon pm1(-1);
- while(1)
- {
+int main()
+{
+ pc.baud(115200);
+ powerMon pmR2(0);
+ int i;
+ while(1)
+ {
wait(0.125);
-
-
-pc.printf("V_Source = %f\n", pm1.V_Source());
-//pc.printf("V_Sense = %f\n", pm1.V_Sense());
-pc.printf("Current = %f\n", pm1.Current());
-//pc.printf("Power_R = %d\n", pm1.Power_Ratio());
-pc.printf("Power = %f\n", pm1.Power());
-}
-
-
-
+ pc.printf("iterate : %i\t\t", i++);
+ pc.printf("V_Source = %f\t\t", pmR2.V_Source());
+ //pc.printf("V_Sense = %f\n", pmR2.V_Sense());
+ pc.printf("Current = %f\t\t", pmR2.Current());
+ //pc.printf("Power_R = %d\n", pmR2.Power_Ratio());
+ pc.printf("Power = %f\n\r", pmR2.Power());
+ }
}
\ No newline at end of file
