I²C Voltage-Current-Power INA219 Sensor
The only remaining operations concern the scaling.
|
Code Editor
|
Library
An INA219 object is declared and initialised by begin().
|
Code Editor
|
Acquisition and retrieval are separated.
Acquisition for all values is done by get(), while there are as many functions as measures, with mV(), mA() and mW(). |
Code Editor
|
Two Applications
I designed two applications.
The first is a V-A-W-metre displayed on a terminal windows connected through serial/USB to the LaunchPad. Minimum and maximum are monitored for each of the three measures. The push button selects between V-A-W and mV-mA-mW, resets the minima and maxima, and exits. This application comes with the library and requires only Binary sketch size: 6312 bytes (of a 16384 byte maximum) Estimated SRAM used: 232 bytes |
The second application I've explored uses a 128x64 high-contrast white-on-black OLED screen.
The push button selects between V-A-W and mV-mA-mW, resets the minima and maxima, and changes the decimal separator between point and coma. I built two versions:
|
The different screens, from left to right: splash screen, measures in mV-mA-mW, measures in V-A-W with point and comma as decimal separator.
Selecting the function with the push button, from left to right: ./m. change of units, =0 reset, ., decimal separator, __ cancel.
Links and Download
|