Skip to content

Commit 716cb56

Browse files
author
K. Townsend
committed
Fixed EEPROM issue
1 parent 932d292 commit 716cb56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_MCP4725/Adafruit_MCP4725.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ def setVoltage(self, voltage, persist=False):
3030
# Value needs to be left-shifted four bytes for the MCP4725
3131
bytes = [(voltage >> 4) & 0xFF, (voltage << 4) & 0xFF]
3232
if (persist):
33-
self.i2c.writeList(self.__REG_WRITEDACEEPROM, self.i2c.reverseByteOrder(voltage))
33+
self.i2c.writeList(self.__REG_WRITEDACEEPROM, bytes)
3434
else:
3535
self.i2c.writeList(self.__REG_WRITEDAC, bytes)

0 commit comments

Comments
 (0)