mirror of
https://github.com/xtacocorex/CHIP_IO
synced 2025-07-20 21:03:22 +00:00
Fixing issue with the enable 1.8v pin code. Updating version to 0.2.7
This commit is contained in:
@ -35,7 +35,7 @@ def set_1v8_pin_voltage(voltage):
|
||||
return False
|
||||
if voltage < 1.8 or voltage > 3.3:
|
||||
return False
|
||||
voltage=round((voltage - 1.8) / 0.1) << 4
|
||||
voltage=int(round((voltage - 1.8) / 0.1)) << 4
|
||||
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y" ,"0", "0x34", "0x90", "0x03"]):
|
||||
return False
|
||||
if subprocess.call(["/usr/sbin/i2cset", "-f", "-y", "0", "0x34", "0x91", str(voltage)]):
|
||||
|
Reference in New Issue
Block a user