Skip to content
Snippets Groups Projects
Commit 795d3868 authored by Gijs Schoonderbeek's avatar Gijs Schoonderbeek
Browse files

Update rd_unb2c.py not working yet

parent bde853e4
Branches
Tags
1 merge request!2Modified the scripts to run on Raspberry Pi.
...@@ -37,13 +37,13 @@ def rw_eeprom(value=0xAB): ...@@ -37,13 +37,13 @@ def rw_eeprom(value=0xAB):
def front_led(value=0xFF, ADDRESS=0x71): def front_led(value=0xFF, ADDRESS=0x71):
main_switch = I2C(ADDRESS) main_switch = I2C(ADDRESS)
main_switch.bus = I2CBUSNR main_switch.bus = I2CBUSNR
main_switch.write_pointer(0x20) #select LED ret_ack = main_switch.write_pointer(0x20) #select LED
if ret_ack < 1: if ret_ack < 1:
print("Main I2C switch not found") print("Main I2C switch not found")
else: else:
front = I2C(ADDRESS=0x41) front = I2C(ADDRESS=0x41)
front.bus = I2CBUSNR front.bus = I2CBUSNR
front.write_bytes(0x03, 0) ret_ack = front.write_bytes(0x03, 0)
if ret_ack < 1: if ret_ack < 1:
print("Front LED driver not found") print("Front LED driver not found")
else: else:
...@@ -136,7 +136,7 @@ def read_qsfp(node_nr = 0, module=0): ...@@ -136,7 +136,7 @@ def read_qsfp(node_nr = 0, module=0):
stri = "Voltage QSFP in slot {0} node {1} is {2:3.2f} V".format(module, node_nr, Power_in_mod) stri = "Voltage QSFP in slot {0} node {1} is {2:3.2f} V".format(module, node_nr, Power_in_mod)
print(stri) print(stri)
if 0: if 1:
rw_eeprom(0xCD) rw_eeprom(0xCD)
else: else:
front_led() front_led()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment