Basic INA219, with set calibaration and functions for reading raw register and write to register

Dependents:   SensorsThingSpeak

Revision:
0:cdfbda214bee
Child:
1:6b9f92e99dd7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INA219.h	Fri Nov 20 08:24:43 2015 +0000
@@ -0,0 +1,23 @@
+#ifndef INA219_H
+#define INA219_H
+
+#include "mbed.h"
+#include "I2CR.h"
+
+class INA219 {
+    public:
+    
+    INA219();
+    
+    uint16_t readRawReg(uint8_t);
+    uint8_t write_reg(uint8_t, uint8_t);
+    
+    private:
+    
+    I2CR i2cr;
+    
+    uint8_t dt[4];
+    void calibration();   
+};
+
+#endif 
\ No newline at end of file