diff --git a/assets/components/power-sensor/ina219-config-builder.png b/assets/components/power-sensor/ina219-config-builder.png new file mode 100644 index 0000000000..708e4fce55 Binary files /dev/null and b/assets/components/power-sensor/ina219-config-builder.png differ diff --git a/docs/components/power-sensor/fake.md b/docs/components/power-sensor/fake.md index 80cf88b212..686e3219a2 100644 --- a/docs/components/power-sensor/fake.md +++ b/docs/components/power-sensor/fake.md @@ -1,10 +1,10 @@ --- -title: "Configure a Fake Power Sensor" +title: "Configure a fake power sensor" linkTitle: "fake" weight: 10 type: "docs" description: "Configure a fake power sensor to test software without the physical hardware." -tags: ["sensor", "components"] +tags: ["sensor", "power sensor"] icon: "/icons/components/sensor.svg" images: ["/icons/components/sensor.svg"] # SME: #team-bucket diff --git a/docs/components/power-sensor/ina219.md b/docs/components/power-sensor/ina219.md index 33b1d455a7..6cd70becbd 100644 --- a/docs/components/power-sensor/ina219.md +++ b/docs/components/power-sensor/ina219.md @@ -1,5 +1,5 @@ --- -title: "Configure an INA219 sensor" +title: "Configure an INA219 power sensor" linkTitle: "ina219" weight: 70 draft: false @@ -8,21 +8,18 @@ description: "Configure an INA219 model sensor." tags: ["sensor", "components"] icon: "/icons/components/sensor.svg" images: ["/icons/components/sensor.svg"] -# SME: #team-bucket +# SME: --- -Configure a `INA219` sensor to integrate a [INA219 current sensor](https://www.amazon.com/dp/B07QJW6L4C) into your robot: +Configure an `INA219` power sensor to integrate into your robot: -{{< tabs >}} +{{< tabs name="Configure an INA219 Power Sensor" >}} {{% 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 on the **Components** subtab and navigate to the **Create component** menu. Select the type `power_sensor`, then select the `ina219` model. Name your sensor, and click **Create**. -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. @@ -34,7 +31,7 @@ Edit and fill in the attributes as applicable. "components": [ { "name": "", - "type": "sensor", + "type": "power_sensor", "model": "INA219", "attributes": { "board": "", diff --git a/docs/components/power-sensor/ina226.md b/docs/components/power-sensor/ina226.md index ac214b8f47..0086eb51cb 100644 --- a/docs/components/power-sensor/ina226.md +++ b/docs/components/power-sensor/ina226.md @@ -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 ---- \ No newline at end of file +# 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": "", + "type": "power_sensor", + "model": "INA226", + "attributes": { + "board": "", + "i2c_bus": "" + }, + "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 [I2C 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. |