Library for working with the HYCON HY3116/8 24-bit weigh-scales ADC series.

Revision:
4:1571244a8486
Parent:
3:535ed9a0ce59
Child:
5:3fdbe36e5057
--- a/HY3116.cpp	Tue Jun 28 13:27:09 2016 +0000
+++ b/HY3116.cpp	Tue Jun 28 13:51:20 2016 +0000
@@ -1,18 +1,12 @@
 #include "HY3116.h"
 
-// Define I2C pins (SDA,SCL)
-//static I2C i2c(p6,p5); // nRF51-DK
-//static I2C i2c(p7,p20); // nRF51-DK
-//static I2C i2c(p22,p21); // nRF51-DK
-
 /**
  * Constructor.
  * Prepares the output pins.
  */
 HY3116::HY3116(PinName sda,
-               PinName scl)
+               PinName scl) : i2c(sda, scl)
 {
-    i2c(sda, scl);
     // Set the I2C clock frequency
     i2c.frequency(100000);
 } // End constructor