Example for Lib Pulses. Measurement of power and energy with a energy meter which has a S0 interface

Dependencies:   Pulses mbed

Measurement of low frequencys based on timing between pulses. Example for using a energy meter with S0 interface.

Files at this revision

API Documentation at this revision

Comitter:
jocis
Date:
Thu Nov 08 17:17:42 2012 +0000
Parent:
3:97db3807db8a
Commit message:
fixed unit of sumEnergy

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Thu Nov 08 14:45:23 2012 +0000
+++ b/main.cpp	Thu Nov 08 17:17:42 2012 +0000
@@ -26,7 +26,7 @@
             averagePower,
             minPower,
             maxPower,
-            sumEnergy,
+            sumEnergy / 3600.0f,
             pulses.getCounter() );
 
         // wait(6);   // Example 6 seconds; typical 1 minute (60 sec) sample time