#!/usr/bin/python2 from power_sensor import power_sensor from time import sleep ps = power_sensor(1, 0x40) while True: voltage = ps.shunt_voltage_mv() print str(voltage) + " mV" current = ps.current_ma() print str(current) + " mA" power = ps.power_mw() print str(power) + " mW" sleep(1)