Skip to content

Commit

Permalink
Remove cal call, require caller to do ut
Browse files Browse the repository at this point in the history
  • Loading branch information
apalrd committed Oct 30, 2022
1 parent 30478d2 commit 57d398b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions INA219.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ class Mode:

class INA219:
def __init__(self, i2c_bus=1, addr=0x40):
self.bus = smbus.SMBus(i2c_bus);
self.bus = smbus.SMBus(i2c_bus)
self.addr = addr

# Set chip to known config values to start
self._cal_value = 0
self._current_lsb = 0
self._power_lsb = 0
self.set_calibration_32V_2A()
#Perform no calibration, require user to do it

def read(self,address):
data = self.bus.read_i2c_block_data(self.addr, address, 2)
Expand Down

0 comments on commit 57d398b

Please sign in to comment.