We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from smbus2 import SMBusWrapper import time EPS_ADDRESS = 0x2b with SMBusWrapper(1) as bus: bus.write_i2c_block_data(EPS_ADDRESS, 0x41, [0x00]) time.sleep(0.5) print("on") while True: # write_cmd = EPS_ADDRESS << 1 # EPS_ADDRESS = b"0x2b" # bus.write_i2c_block_data(EPS_ADDRESS, 0x10, [0xE440]) bus.write_i2c_block_data(EPS_ADDRESS, 0x10, [0xE4]) bus.write_i2c_block_data(EPS_ADDRESS, 0x10, [0x44]) # time.sleep(0.5) # Anything explicit (addresses like 0x10) should be in an enum # bus.write_i2c_block_data(EPS_ADDRESS, 0x11, [0x30]) time.sleep(0.5) srikar = bus.read_i2c_block_data(EPS_ADDRESS, 0x10, 2) print(srikar) print((srikar[0] * 256 + srikar[1]) * .00893) time.sleep(0.5) # bus.write_byte(EPS_ADDRESS, EPS_ADDRESS) # time.sleep(0.5) # bus.write_byte(EPS_ADDRESS, 0x40) # time.sleep(0.5) # bus.write_byte(EPS_ADDRESS, 0x00) # print("All PDMs on.") # time.sleep(3) ######################################## # bus.write_byte(EPS_ADDRESS, write_cmd) # time.sleep(0.5) # bus.write_byte(EPS_ADDRESS, 0x40) # time.sleep(0.5) # bus.write_byte(EPS_ADDRESS, 0x00) # print("All PDMs off.") # time.sleep(0.5) break print("Done.")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: