added delay between prints of 0.01

pull/114/head
alanbjohnston 5 years ago committed by GitHub
parent 9e890c1082
commit c5d551b582
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -178,37 +178,45 @@ if __name__ == "__main__":
while (True): while (True):
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_one.bus_voltage), "{:6.3f} ".format(ina219_one.current) , end = '') print("{:6.3f} ".format(ina219_one.bus_voltage), "{:6.3f} ".format(ina219_one.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_two.bus_voltage), "{:6.3f} ".format(ina219_two.current) , end = '') print("{:6.3f} ".format(ina219_two.bus_voltage), "{:6.3f} ".format(ina219_two.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_three.bus_voltage), "{:6.3f} ".format(ina219_three.current) , end = '') print("{:6.3f} ".format(ina219_three.bus_voltage), "{:6.3f} ".format(ina219_three.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_four.bus_voltage), "{:6.3f} ".format(ina219_four.current) , end = '') print("{:6.3f} ".format(ina219_four.bus_voltage), "{:6.3f} ".format(ina219_four.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_five.bus_voltage), "{:6.3f} ".format(ina219_five.current) , end = '') print("{:6.3f} ".format(ina219_five.bus_voltage), "{:6.3f} ".format(ina219_five.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_six.bus_voltage), "{:6.3f} ".format(ina219_six.current) , end = '') print("{:6.3f} ".format(ina219_six.bus_voltage), "{:6.3f} ".format(ina219_six.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
time.sleep(0.01)
print("{:6.3f} ".format(ina219_seven.bus_voltage), "{:6.3f} ".format(ina219_seven.current) , end = '') print("{:6.3f} ".format(ina219_seven.bus_voltage), "{:6.3f} ".format(ina219_seven.current) , end = '')
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '')
try: try:
print("{:6.3f} ".format(ina219_eight.bus_voltage), "{:6.3f} ".format(ina219_eight.current) , end = '') time.sleep(0.01)
print("{:6.3f} ".format(ina219_eight.bus_voltage), "{:6.3f} ".format(ina219_eight.current))
except: except:
print("{:6.3f} ".format(0), "{:6.3f} ".format(0), end = '') print("{:6.3f} ".format(0), "{:6.3f} ".format(0))
print(" ") # print(" ")
inp = input() inp = input()
# print(inp) # print(inp)

Loading…
Cancel
Save

Powered by TurnKey Linux.