with the tof code

Dependencies:   mbed Servo ros_lib_kinetic

Revision:
4:36a04230554d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Power/power.h	Thu Nov 07 15:31:52 2019 +0000
@@ -0,0 +1,43 @@
+/*--------------------------------------------------------------------------------
+Filename: power.h
+Description: Header file for monitoring battery voltages
+--------------------------------------------------------------------------------*/
+
+#include "mbed.h"
+
+#ifndef POWER_H
+#define POWER_H
+
+/*--------------------------------------------------------------------------------
+---------------------------------DEFINES------------------------------------------
+--------------------------------------------------------------------------------*/
+#define VBATT  PB_1
+#define V5     PC_2
+#define V3     PF_4 
+
+/*--------------------------------------------------------------------------------
+---------------------------------CLASSES------------------------------------------
+--------------------------------------------------------------------------------*/
+
+class cPower
+{
+public:
+    cPower(AnalogIn vbatt, AnalogIn fiveVolts, AnalogIn threeVolts);  //Constructor, initialises the 4 input sensors
+    float monitor_battery();
+    float monitor_5v_line();
+    float monitor_3v3_line();
+private:
+    AnalogIn _vbatt;
+    AnalogIn _5v0;
+    AnalogIn _3v3;
+};
+
+/*--------------------------------------------------------------------------------
+-----------------------------------Functions---------------------------------------
+--------------------------------------------------------------------------------*/
+
+/*--------------------------------------------------------------------------------
+--------------------------------External Variables--------------------------------
+--------------------------------------------------------------------------------*/
+
+#endif