File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,14 @@ bool Adafruit_NAU7802::begin(TwoWire *theWire) {
5050 return false ;
5151 }
5252
53+ // define the main power control register
54+ _pu_ctrl_reg = new Adafruit_I2CRegister (i2c_dev, NAU7802_PU_CTRL);
55+
56+ if (!reset ())
57+ return false ;
58+ if (!enable (true ))
59+ return false ;
60+
5361 /* Check for NAU7802 revision register (0x1F), low nibble should be 0xF. */
5462 Adafruit_I2CRegister rev_reg =
5563 Adafruit_I2CRegister (i2c_dev, NAU7802_REVISION_ID);
@@ -58,13 +66,6 @@ bool Adafruit_NAU7802::begin(TwoWire *theWire) {
5866 return false ;
5967 }
6068
61- // define the main power control register
62- _pu_ctrl_reg = new Adafruit_I2CRegister (i2c_dev, NAU7802_PU_CTRL);
63-
64- if (!reset ())
65- return false ;
66- if (!enable (true ))
67- return false ;
6869 if (!setLDO (NAU7802_3V0))
6970 return false ;
7071 if (!setGain (NAU7802_GAIN_128))
You can’t perform that action at this time.
0 commit comments