Library for Akizuki MCP3425 ADC module

Fork of MCP3425 by yasuyuki onodera

Library for MCP3425 ADC module from Akizuki-denshi.

Revision:
1:5ac344aa0aac
Parent:
0:b7bc51be525f
Child:
2:7375e645e806
--- a/MCP3425.h	Wed Oct 15 14:37:59 2014 +0000
+++ b/MCP3425.h	Tue Apr 12 14:56:07 2016 +0000
@@ -8,7 +8,7 @@
 #ifndef MCP3425_H_
 #define MCP3425_H_
 
-#define MCP3425_ADDR                0xD0
+#define MCP3425_ADDR  (0xD0)
 
 #include "mbed.h"
 #include "typedef.h"
@@ -34,9 +34,11 @@
     MCP3425 (PinName sda, PinName scl);
     MCP3425 (I2C& p_i2c);
     void init();
-    short get();
+    short get(); // Returns AD code
+    float read(); // Returns voltage
 
 protected:
+    static const float VREF;
     
     I2C _i2c;