zephyr/samples/drivers/current_sensing
Kumar Gala a1b77fd589 zephyr: replace zephyr integer types with C99 types
git grep -l 'u\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/u\(8\|16\|32\|64\)_t/uint\1_t/g"
	git grep -l 's\(8\|16\|32\|64\)_t' | \
		xargs sed -i "s/s\(8\|16\|32\|64\)_t/int\1_t/g"

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-06-08 08:23:57 -05:00
..
src zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
CMakeLists.txt samples: make find_package(Zephyr...) REQUIRED 2020-05-29 10:47:25 +02:00
prj.conf i2c: unify kconfig options and share them across drivers 2016-05-12 10:57:22 +00:00
README.rst samples: drivers: current_sensing: Change README to rst format 2020-05-15 17:18:56 +02:00
sample.yaml tests: fix test identifiers 2019-12-09 15:53:44 -05:00

.. _current_sensing:

Current Sensing
###############

Overview
********
This is a sample app to interface with TI INA219 power monitor.
The values used in the app are for use on Adafruit's breakout board
(https://www.adafruit.com/products/904).

This assumes the slave address is 0x40, where A0 and A1 are all tied to ground.

Building and Running
********************

This project outputs measured values to the console. It can be built and
executed as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/current_sensing
   :host-os: unix
   :goals: build flash
   :compact:

Sample Output
=============

.. code-block:: console

	Bus Voltage: 3300 mV
	Shunt Voltage: 100 uV
	Current: 5000 uA
	Power: 16500 uW