Micropython library for the TI INA219 voltage/current sensor

Discuss development of drivers for external hardware and components, such as LCD screens, sensors, motor drivers, etc.
Target audience: Users and developers of drivers.
Post Reply
chrisb2
Posts: 15
Joined: Sat Apr 01, 2017 4:19 am

Micropython library for the TI INA219 voltage/current sensor

Post by chrisb2 » Tue May 16, 2017 8:29 am

https://github.com/chrisb2/pyb_ina219

I have written this library based on one I wrote for the Raspberry Pi. It supports the INA219 voltage, current and power monitor sensor from Texas Instruments. The intent of the library is to make it easy to use the quite complex functionality of this sensor.

Its currently under development, with the next step being porting the unit tests from the Raspberry Pi version. Manual testing shows the functionality working as expected.

Feedback and suggestions welcome. I am quite new to MicroPython.

Chris

chrisb2
Posts: 15
Joined: Sat Apr 01, 2017 4:19 am

Re: Micropython library for the TI INA219 voltage/current sensor

Post by chrisb2 » Sat May 20, 2017 9:55 am

I have updated this library to use machine.I2C instead of pyb.I2C, so it should now work on all MicroPython hardware, though I have only have a pyboard to test with. Let me know if you successfully use it with other hardware.

Chris

User avatar
deshipu
Posts: 1220
Joined: Thu May 28, 2015 5:54 pm

Re: Micropython library for the TI INA219 voltage/current sensor

Post by deshipu » Sun May 28, 2017 6:14 am

Very nice! I wonder if we could move this thread to the "Drivers for External Components" section?

chrisb2
Posts: 15
Joined: Sat Apr 01, 2017 4:19 am

Re: Micropython library for the TI INA219 voltage/current sensor

Post by chrisb2 » Sun May 28, 2017 6:53 am

I looked around for an option to do that, but could not find one, maybe an Admin can do it?

thanks,
Chris

torwag
Posts: 196
Joined: Fri Dec 13, 2013 9:25 am

Re: Micropython library for the TI INA219 voltage/current sensor

Post by torwag » Sun May 28, 2017 6:59 am

Moved to driver section...

chrisb2
Posts: 15
Joined: Sat Apr 01, 2017 4:19 am

Re: Micropython library for the TI INA219 voltage/current sensor

Post by chrisb2 » Sun Jun 25, 2017 3:55 am

I have now verified this library works with an esp8266 (NodeMCU clone), see Using the Library on an ESP8266

chrisb2
Posts: 15
Joined: Sat Apr 01, 2017 4:19 am

Re: Micropython library for the TI INA219 voltage/current sensor

Post by chrisb2 » Thu Sep 28, 2017 7:20 am

I have now verified this library works with an esp32 (Lolin32 Lite), see Using the Library on an ESP32

Post Reply