Skip to content

ESP8266 issue #13

@MrGadzet

Description

@MrGadzet

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.
image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions