in test phase power monitoring for turtlebot
Dependencies: PowerMonlib2 mbed
Fork of TestPMLIB by
main.cpp
- Committer:
- sippasaeng
- Date:
- 2018-06-15
- Revision:
- 0:fbbd04cdb029
- Child:
- 1:79b4bdf4997b
File content as of revision 0:fbbd04cdb029:
#include "mbed.h" #include "PowerMon.h" Serial pc(USBTX, USBRX); // tx, rx int main() { powerMon pm1(-1); 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()); } }