-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61bf2ab
commit 2b7b77c
Showing
4 changed files
with
58 additions
and
15 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,55 @@ | ||
--- | ||
title: "Configure an INA226 Power Sensor" | ||
title: "Configure an INA226 power sensor" | ||
linkTitle: "ina226" | ||
weight: 10 | ||
type: "docs" | ||
description: "Configure an INA226 power sensor to test software." | ||
images: ["/icons/components/imu.svg"] | ||
# SMEs: Rand | ||
--- | ||
# SME: | ||
--- | ||
|
||
Configure a `INA226` sensor to integrate a [INA226 current sensor](https://www.amazon.com/INA226-Voltage-Current-Module-Monitoring/dp/B08MKSQSL9) into your robot: | ||
|
||
{{< tabs >}} | ||
{{% tab name="Config Builder" %}} | ||
|
||
Navigate to the **Config** tab of your robot's page in [the Viam app](https://app.viam.com). | ||
Click on the **Components** subtab and navigate to the **Create component** menu. | ||
Enter a name for your sensor, select the type `sensor`, and select the `INA219` model. | ||
|
||
Click **Create component**. | ||
|
||
![Creation of a INA219 sensor in the Viam app config builder.](/components/sensor/power-ina219-sensor-ui-config.png) | ||
|
||
Edit and fill in the attributes as applicable. | ||
|
||
{{% /tab %}} | ||
{{% tab name="JSON Template" %}} | ||
|
||
```json {class="line-numbers linkable-line-numbers"} | ||
{ | ||
"components": [ | ||
{ | ||
"name": "<your-INA219-sensor-name>", | ||
"type": "power_sensor", | ||
"model": "INA226", | ||
"attributes": { | ||
"board": "<your-board-name>", | ||
"i2c_bus": "<your-i2c-bus-name-on-board>" | ||
}, | ||
"depends_on": [] | ||
} | ||
] | ||
} | ||
``` | ||
|
||
{{% /tab %}} | ||
{{% /tabs %}} | ||
|
||
The following attributes are available for `INA219` sensors: | ||
|
||
| Attribute | Type | Inclusion | Description | | ||
| --------- | -----| --------- | ----------- | | ||
| `board` | string | **Required** | The `name` of the [board](/components/board/) the sensor is wired to. | | ||
| `i2c_bus` | string | **Required** | The `name` of the [I<sup>2</sup>C bus](/components/board/#i2cs) on the board that the sensor is wired to. | | ||
| `i2c_address` | string | Optional | Default: `0x40`. The [I2C device address](https://learn.adafruit.com/i2c-addresses/overview) of the sensor. | |