INA226 Library

Files at this revision

API Documentation at this revision

Comitter:
zebrin1422
Date:
Mon Jul 17 09:38:13 2017 +0000
Parent:
3:ea79e6a72ec3
Commit message:
INA226 Library

Changed in this revision

INA226.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/INA226.cpp	Sat Jul 15 07:14:20 2017 +0000
+++ b/INA226.cpp	Mon Jul 17 09:38:13 2017 +0000
@@ -27,7 +27,7 @@
     cmd[1] = static_cast<char>(val>>8 & 0x00FF);
     cmd[2] = static_cast<char>(val & 0x00FF);
     
-    i2c->write(SLV_WRITE, cmd, 1);
+    i2c->write(SLV_WRITE, cmd, 3);
 }
 
 /*************