-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
Hi,
i am trying to run this current sensor with esp8266, but i've got a lot of issues. I solved a most of the problems myself but one i can't do for 3 days.
During start program it shows me "AttributeError: 'module' object has no attribute '_level'". Code is from your example. You can see it below. The logging.py file from official micropython github from linked file in README.
from machine import Pin, I2C
from ina219 import INA219
from logging import INFO
i2c = I2C(scl=Pin(5), sda=Pin(4), freq=400000)
SHUNT_OHMS = 0.1
ina = INA219(SHUNT_OHMS, i2c)
ina.configure()
print("Bus Voltage: %.3f V" % ina.voltage())
print("Current: %.3f mA" % ina.current())
print("Power: %.3f mW" % ina.power())
Have you got any solution of this problem?