mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
a6476bd813
- Use standard RIOT style `ina2xx_params_t` on initialization as explained in [1] instead of a custom API - Provided a default configuration via `ina2xx_params_t` as required by [1] that works fine for the INA219 breakout board and with an optimal resolution that still covers the whole range of USB high-power devices (500 mA @ 5V) with a comfortable safe margin. - Changed initialization procedure to include a device reset and connectivity test, as required by [1] - The calibration value is now calculated by the driver - This simplifies using the driver a lot - The user can still choose a trade-off between range and resolution that matches the application requirements, but now among predefined values - This allows the driver to easily convert the raw data into meaningful physical data, as the resolution of the raw data is known - All measurements are provided as meaningful physical data as required by [1] [1]: https://github.com/RIOT-OS/RIOT/wiki/Guide:-Writing-a-device-driver-in-RIOT
16 lines
712 B
Markdown
16 lines
712 B
Markdown
# About
|
|
This is a manual test application for the INA219/INA220 current and power
|
|
monitor driver.
|
|
|
|
# Usage
|
|
This test application will initialize the sensor with the default parameters
|
|
in @ref ina2xx_params.h
|
|
|
|
After initialization, the application will print a table of the devices
|
|
measurement data. If the I2C interface is fast enough, one row corresponds to
|
|
one measurement of the device. (The sensor indicates when a new measurement is
|
|
available via flags, this flags are read until the measurement is done. The
|
|
duration of one measurement depends on the sensor settings and is between
|
|
84µs and 68.1ms. Please note that blocking stdio might very well be the
|
|
bottleneck causing the test to miss measurements.)
|