From c00f3543172e7b4b6bddf70c05655324fd88fd5f Mon Sep 17 00:00:00 2001 From: Sierra Guequierre Date: Wed, 13 Dec 2023 13:44:56 -0500 Subject: [PATCH] DOCS-1459: Remove i2cs and SPIs (#2319) --- docs/appendix/glossary/model.md | 2 +- .../micro-rdk/movement-sensor/gyro-mpu6050.md | 2 +- docs/components/board/_index.md | 12 +--- docs/components/board/beaglebone.md | 12 +--- docs/components/board/fake.md | 12 +--- docs/components/board/jetson.md | 18 +---- docs/components/board/pi.md | 30 +-------- docs/components/board/ti.md | 18 +---- docs/components/board/upboard.md | 31 ++------- docs/components/encoder/ams-as5048.md | 4 +- .../movement-sensor/gps/gps-nmea-rtk-pmtk.md | 2 +- .../movement-sensor/gps/gps-nmea.md | 2 +- .../movement-sensor/imu/imu-vectornav.md | 2 +- docs/components/movement-sensor/mpu6050.md | 2 +- docs/components/power-sensor/ina219.md | 2 +- docs/components/power-sensor/ina226.md | 2 +- docs/components/sensor/bme280.md | 2 +- docs/components/sensor/sensirion-sht3xd.md | 2 +- .../include/components/board-attr-config.md | 12 ---- .../include/components/board/board-analogs.md | 1 - static/include/components/board/board-i2cs.md | 66 ------------------- static/include/components/board/board-spis.md | 63 ------------------ 22 files changed, 26 insertions(+), 273 deletions(-) delete mode 100644 static/include/components/board/board-i2cs.md delete mode 100644 static/include/components/board/board-spis.md diff --git a/docs/appendix/glossary/model.md b/docs/appendix/glossary/model.md index 8b479dbdd4..20c4ded483 100644 --- a/docs/appendix/glossary/model.md +++ b/docs/appendix/glossary/model.md @@ -10,7 +10,7 @@ A particular implementation of a {{< glossary_tooltip term_id="resource" text="r Models allow you to control hardware or software of a similar category, such as motors, with a consistent set of methods as an interface, even if the underlying implementation differs. -For example, some _models_ of DC motors communicate using [GPIO](/components/board/), while other DC motors use serial protocols like the [SPI bus](/components/board/#spis). +For example, some _models_ of DC motors communicate using [GPIO](/components/board/), while other DC motors use serial protocols like the SPI bus. Regardless, you can power any motor model that implements the `rdk:component:motor` API with the `SetPower()` method. Models are either included with [`viam-server`](/get-started/installation/), provided in {{< glossary_tooltip term_id="module" text="custom modules" >}} available for download from the [Viam registry](https://app.viam.com/registry), or installed as [local modules](/registry/configure/#local-modules). diff --git a/docs/build/micro-rdk/movement-sensor/gyro-mpu6050.md b/docs/build/micro-rdk/movement-sensor/gyro-mpu6050.md index eb892d8679..5e573b6148 100644 --- a/docs/build/micro-rdk/movement-sensor/gyro-mpu6050.md +++ b/docs/build/micro-rdk/movement-sensor/gyro-mpu6050.md @@ -117,7 +117,7 @@ Then remove and fill in the attributes as applicable to your movement sensor, ac | Name | Type | Inclusion | Description | | --------------------- | ------- | ------------ | ----------- | | `board` | string | **Required** | The `name` of the [board](/build/micro-rdk/board/) to which the device is wired. | -| `i2c_bus` | string | **Required** | The `name` of the [I2C bus configured](/components/board/#i2cs) on your [board](/components/board/) wired to this device. | +| `i2c_bus` | string | **Required** | The `name` of the I2C bus configured on your [board](/components/board/) wired to this device. | | `use_alt_i2c_address` | boolean | Optional | Depends on whether you wire AD0 low (leaving the default address of 0x68) or high (making the address 0x69). If high, set `true`. If low, set `false`.
Default: `false` | ## Test the movement sensor diff --git a/docs/components/board/_index.md b/docs/components/board/_index.md index 8a16b0d370..81237bb9e7 100644 --- a/docs/components/board/_index.md +++ b/docs/components/board/_index.md @@ -48,7 +48,7 @@ For configuration information, click on the model name: | [`ti`](ti/) | [Texas Instruments TDA4VM](https://devices.amazonaws.com/detail/a3G8a00000E2QErEAN/TI-TDA4VM-Starter-Kit-for-Edge-AI-vision-systems) | | [`beaglebone`](beaglebone/) | [BeagleBoard's BeagleBone AI-64](https://www.beagleboard.org/boards/beaglebone-ai-64) | | [`numato`](numato/) | [Numato GPIO Modules](https://numato.com/product-category/automation/gpio-modules/), peripherals for adding GPIO pins | -| [`pca9685`](pca9685/) | [PCA9685 Arduino I2C Interface](https://www.adafruit.com/product/815), a 16-channel [I2C](#i2cs) [PWM](https://docs.arduino.cc/learn/microcontrollers/analog-output)/[servo](/components/servo/) driver peripheral | +| [`pca9685`](pca9685/) | [PCA9685 Arduino I2C Interface](https://www.adafruit.com/product/815), a 16-channel I2C [PWM](https://docs.arduino.cc/learn/microcontrollers/analog-output)/[servo](/components/servo/) driver peripheral | | [`customlinux`](customlinux/) | A model for other Linux boards. | | [`fake`](fake/) | A model used for testing, with no physical hardware | @@ -62,7 +62,7 @@ If you are using the micro-RDK, navigate to [Micro-RDK Board](/build/micro-rdk/b ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs), [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs) and [digital interrupts](#digital_interrupts) into your robot. ### `analogs` @@ -72,14 +72,6 @@ Configuring these attributes on your board allows you to integrate [analog-to-di {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} - ## Control your board with Viam's client SDK libraries To get started using Viam's SDKs to connect to and control your robot, go to your robot's page on [the Viam app](https://app.viam.com), navigate to the **Code sample** tab, select your preferred programming language, and copy the sample code generated. diff --git a/docs/components/board/beaglebone.md b/docs/components/board/beaglebone.md index 0aff0b1d5d..05649f881f 100644 --- a/docs/components/board/beaglebone.md +++ b/docs/components/board/beaglebone.md @@ -58,21 +58,11 @@ The following attributes are available for `beaglebone` boards: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `digital_interrupts` | object | Optional | Any digital interrupts's {{< glossary_tooltip term_id="pin-number" text="pin number" >}} and name. See [configuration info](#digital_interrupts). | -| `spis` | object | Optional | Any serial peripheral interface (SPI) chip select bus pins' index and name. See [configuration info](#spis). | -| `i2cs` | object | Optional | Any inter-integrated circuit (I2C) bus pins' index and name. See [configuration info](#i2cs). | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts) into your robot. ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/board/fake.md b/docs/components/board/fake.md index 84bf79dc29..14e4df3429 100644 --- a/docs/components/board/fake.md +++ b/docs/components/board/fake.md @@ -78,12 +78,10 @@ The following attributes are available for `fake` boards: | `fail_new` | bool | **Required** | If the fake board should raise an error at robot start-up. | | `analogs` | object | Optional | Attributes of any pins that can be used as Analog-to-Digital Converter (ADC) inputs. See [configuration info](#analogs). | | `digital_interrupts` | object | Optional | Pin and name of any digital interrupts. See [configuration info](#digital_interrupts). | -| `spis` | object | Optional | Any serial peripheral interface (SPI) chip select bus pins' index and name. See [configuration info](#spis). | -| `i2cs` | object | Optional | Any inter-integrated circuit (I2C) bus pins' index and name. See [configuration info](#i2cs). | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs), [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs) and [digital interrupts](#digital_interrupts) into your robot. ### `analogs` @@ -92,11 +90,3 @@ Configuring these attributes on your board allows you to integrate [analog-to-di ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/board/jetson.md b/docs/components/board/jetson.md index f81ac423c1..61b65cc637 100644 --- a/docs/components/board/jetson.md +++ b/docs/components/board/jetson.md @@ -57,12 +57,6 @@ Enter a name for your board and click **Create**. "attributes": { "digital_interrupts": [ <...See table below...> - ], - "spis": [ - <...See table below...> - ], - "i2cs": [ - <...See table below...> ] }, "depends_on": [] @@ -80,21 +74,11 @@ The following attributes are available for `jetson` boards: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `digital_interrupts` | object | Optional | Any digital interrupts's {{< glossary_tooltip term_id="pin-number" text="pin number" >}} and name. See [configuration info](#digital_interrupts). | -| `spis` | object | Optional | Any Serial Peripheral Interface (SPI) chip select pins' bus index and name. See [configuration info](#spis). | -| `i2cs` | object | Optional | Any Inter-Integrated Circuit (I2C) pins' bus index and name. See [configuration info](#i2cs). | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts) into your robot. ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/board/pi.md b/docs/components/board/pi.md index 1fb5d418af..3fb3037fba 100644 --- a/docs/components/board/pi.md +++ b/docs/components/board/pi.md @@ -55,18 +55,6 @@ Then remove and fill in the attributes as applicable to your board, according to "pin": "", "type": "" } - ], - "spis": [ - { - "name": "", - "bus_select": "" - } - ], - "i2cs": [ - { - "name": "", - "bus": "" - } ] } ``` @@ -109,12 +97,6 @@ Then remove and fill in the attributes as applicable to your board, according to ], "digital_interrupts": [ <...See table below...> - ], - "spis": [ - <...See table below...> - ], - "i2cs": [ - <...See table below...> ] }, "depends_on": [] @@ -133,12 +115,10 @@ The following attributes are available for `pi` boards: | ---- | ---- | --------- | ----------- | | `analogs` | object | Optional | Attributes of any pins that can be used as analog-to-digital converter (ADC) inputs. See [configuration info](#analogs). | | `digital_interrupts` | object | Optional | Any digital interrupts's {{< glossary_tooltip term_id="pin-number" text="pin number" >}} and name. See [configuration info](#digital_interrupts). | -| `spis` | object | Optional | Any Serial Peripheral Interface (SPI) chip select pins' bus index and name. See [configuration info](#spis). Review [these instructions](/get-started/installation/prepare/rpi-setup/#enable-communication-protocols) to learn how to enable SPI on a Raspberry Pi 4. | -| `i2cs` | object | Optional | Any Inter-Integrated Circuit (I2C) pins' bus index and name. See [configuration info](#i2cs). Review [these instructions](/get-started/installation/prepare/rpi-setup/#enable-communication-protocols) to learn how to enable I2C on a Raspberry Pi 4. | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs), [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [analog-to-digital converters](#analogs) and [digital interrupts](#digital_interrupts) into your robot. ### `analogs` @@ -147,11 +127,3 @@ Configuring these attributes on your board allows you to integrate [analog-to-di ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/board/ti.md b/docs/components/board/ti.md index 016ba4a4b1..b88341f2bf 100644 --- a/docs/components/board/ti.md +++ b/docs/components/board/ti.md @@ -45,12 +45,6 @@ Enter a name for your board and click **Create**. "attributes": { "digital_interrupts": [ <...See table below...> - ], - "spis": [ - <...See table below...> - ], - "i2cs": [ - <...See table below...> ] }, "depends_on": [] @@ -68,21 +62,11 @@ The following attributes are available for `ti` boards: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `digital_interrupts` | object | Optional | Any digital interrupts's {{< glossary_tooltip term_id="pin-number" text="pin number" >}} and name. See [configuration info](#digital_interrupts). | -| `spis` | object | Optional | Any Serial Peripheral Interface (SPI) chip select bus pins' index and name. See [configuration info](#spis). | -| `i2cs` | object | Optional | Any Inter-Integrated Circuit (I2C) bus pins' index and name. See [configuration info](#i2cs). | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts), and components that must communicate through the [SPI](#spis) and [I2C](#i2cs) protocols into your robot. +Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts) into your robot. ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `spis` - -{{< readfile "/static/include/components/board/board-spis.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/board/upboard.md b/docs/components/board/upboard.md index 575ea93c26..f69e9f1b3f 100644 --- a/docs/components/board/upboard.md +++ b/docs/components/board/upboard.md @@ -49,12 +49,6 @@ Then remove and fill in the attributes as applicable to your board, according to "name": "", "pin": "" } - ], - "i2cs": [ - { - "name": "", - "bus": "" - } ] } ``` @@ -64,10 +58,10 @@ Then remove and fill in the attributes as applicable to your board, according to ```json {class="line-numbers linkable-line-numbers"} { - "i2cs": [ + "digital_interrupts": [ { - "name": "my-i2c-bus1", - "bus": "1" + "name": "your-interrupt", + "pin": "18" } ] } @@ -93,12 +87,6 @@ Then remove and fill in the attributes as applicable to your board, according to "name": "", "pin": "" } - ], - "i2cs": [ - { - "name": "", - "bus": "" - } ] }, "depends_on": [] @@ -119,10 +107,10 @@ Then remove and fill in the attributes as applicable to your board, according to "type": "board", "namespace": "rdk", "attributes": { - "i2cs": [ + "digital_interrupts": [ { - "name": "my-i2c-bus1", - "bus": "1" + "name": "your-interrupt", + "pin": "18" } ] }, @@ -141,16 +129,11 @@ The following attributes are available for `upboard` boards: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `digital_interrupts` | object | Optional | Any digital interrupts's {{< glossary_tooltip term_id="pin-number" text="pin number" >}} and name. See [configuration info](/components/board/#digital_interrupts). | -| `i2cs` | object | Optional | Any Inter-Integrated Circuit (I2C) pins' bus index and name. See [configuration info](#i2cs). | ## Attribute Configuration -Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts), and components that must communicate through [I2C](#i2cs) protocol into your robot. +Configuring these attributes on your board allows you to integrate [digital interrupts](#digital_interrupts) into your robot. ### `digital_interrupts` {{< readfile "/static/include/components/board/board-digital-interrupts.md" >}} - -### `i2cs` - -{{< readfile "/static/include/components/board/board-i2cs.md" >}} diff --git a/docs/components/encoder/ams-as5048.md b/docs/components/encoder/ams-as5048.md index 55437779f2..7c48e1c61c 100644 --- a/docs/components/encoder/ams-as5048.md +++ b/docs/components/encoder/ams-as5048.md @@ -11,7 +11,7 @@ aliases: --- The `AMS-AS5048` encoder model supports AMS's [AS5048](https://ams.com/en/as5048a) encoder. -This is an absolute encoder that uses an [I2C](/components/board/#i2cs) or [SPI](/components/board/#spis) interface to connect. +This is an absolute encoder that uses an I2C or SPI interface to connect. {{% alert title="Important" color="note" %}} Any [motor](/components/motor/) using the `AMS-AS5048` encoder must have its `ticks_per_rotation` attribute configured as `1` because this encoder provides angular measurements directly. @@ -57,6 +57,6 @@ The following attributes are available for `AMS-AS5048` encoders: | Name | Type | Inclusion | Description | | ---- | ---- | --------- | ----------- | | `connection_type` | string | **Required** | Use `"i2c"`. | -| `i2c_attributes` | object | **Required** | The attributes to configure the [I2C](/components/board/#i2cs) connection:
  • i2c_bus: The index of the [I2C bus configured](/components/board/#i2cs) on the [board](/components/board/) wired to this encoder.
    Example: `"1"`
  • i2c_addr: The address of the bus.
    Example: `64`
| +| `i2c_attributes` | object | **Required** | The attributes to configure the I2C connection:
  • i2c_bus: The index of the I2C bus on the [board](/components/board/) wired to this encoder.
    Example: `"1"`
  • i2c_addr: The address of the bus.
    Example: `64`
| {{< readfile "/static/include/components/test-control/encoder-control.md" >}} diff --git a/docs/components/movement-sensor/gps/gps-nmea-rtk-pmtk.md b/docs/components/movement-sensor/gps/gps-nmea-rtk-pmtk.md index e2be4d65c0..cab1f60732 100644 --- a/docs/components/movement-sensor/gps/gps-nmea-rtk-pmtk.md +++ b/docs/components/movement-sensor/gps/gps-nmea-rtk-pmtk.md @@ -144,7 +144,7 @@ The following attributes are available for a `gps-nmea-rtk-pmtk` movement sensor | Name | Type | Inclusion | Description | | ------------------------ | ------ | ------------ | ----------- | | `i2c_addr` | int | **Required** | The device's I2C address. | -| `i2c_bus` | string | **Required** | The index of the [I2C bus](/components/board/#i2cs) of the board wired to the sensor. | +| `i2c_bus` | string | **Required** | The index of the I2C bus of the board wired to the sensor. | | `i2c_baud_rate` | int | Optional | The rate at which data is sent from the sensor. Optional.
Default: `38400` | | `ntrip_url` | string | **Required** | The URL of the NTRIP server from which you get correction data. Connects to a base station (maintained by a third party) for RTK corrections. | | `ntrip_username` | string | Optional | Username for the NTRIP server. | diff --git a/docs/components/movement-sensor/gps/gps-nmea.md b/docs/components/movement-sensor/gps/gps-nmea.md index 1c03c0cbd5..b2edcc984b 100644 --- a/docs/components/movement-sensor/gps/gps-nmea.md +++ b/docs/components/movement-sensor/gps/gps-nmea.md @@ -206,7 +206,7 @@ For a movement sensor communicating over I2C, you'll need a `i2c_attr | Name | Type | Inclusion | Description | | --------------- | ------ | ------------ | ------------------------ | -| `i2c_bus` | string | **Required** | The index of the [I2C bus](/components/board/#i2cs) on the board wired to the sensor. | +| `i2c_bus` | string | **Required** | The index of the I2C bus on the board wired to the sensor. | | `i2c_addr` | int | **Required** | The device's I2C address. | | `i2c_baud_rate` | int | Optional | The rate at which data is sent from the sensor. Optional.
Default: `38400` | diff --git a/docs/components/movement-sensor/imu/imu-vectornav.md b/docs/components/movement-sensor/imu/imu-vectornav.md index c6add9a151..09b31d1862 100644 --- a/docs/components/movement-sensor/imu/imu-vectornav.md +++ b/docs/components/movement-sensor/imu/imu-vectornav.md @@ -114,7 +114,7 @@ Then remove and fill in the attributes as applicable to your movement sensor, ac | Name | Type | Inclusion | Description | | ---------------------- | ------ | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `board` | string | **Required** | The `name` of the [board](/components/board/) to which the device is wired. | -| `spi` | string | | The `name` of the [SPI bus](/components/board/#spis) over which the device communicates with the board. | +| `spi` | string | | The index of the SPI bus over which the device communicates with the board. | | `chip_select_pin` | string | **Required** | The ({{< glossary_tooltip term_id="pin-number" text="pin number" >}}) of the pin on the board (other than the SPI bus pins) connected to the IMU chip. Used to tell the chip whether the current SPI message is meant for it or for another device. | | `spi_baud_rate` | int | **Required** | The rate at which data is sent from the IMU.
Default: `115200` | | `polling_frequency_hz` | int | **Required** | How many times per second the sensor is polled. | diff --git a/docs/components/movement-sensor/mpu6050.md b/docs/components/movement-sensor/mpu6050.md index 2e5b49c6a2..78c7193858 100644 --- a/docs/components/movement-sensor/mpu6050.md +++ b/docs/components/movement-sensor/mpu6050.md @@ -95,7 +95,7 @@ Then remove and fill in the attributes as applicable to your movement sensor, ac | Name | Type | Inclusion | Description | | --------------------- | ------- | ------------ | ----------- | -| `i2c_bus` | string | **Required** | The index of the [I2C bus](/components/board/#i2cs) on the [board](/components/board/) that your movement sensor is wired to. | +| `i2c_bus` | string | **Required** | The index of the I2C bus on the [board](/components/board/) that your movement sensor is wired to. | | `use_alt_i2c_address` | boolean | Optional | Depends on whether you wire AD0 low (leaving the default address of 0x68) or high (making the address 0x69). If high, set `true`. If low, set `false`.
Default: `false` | ## Test the movement sensor diff --git a/docs/components/power-sensor/ina219.md b/docs/components/power-sensor/ina219.md index cf74fecd8b..0282cf2fd9 100644 --- a/docs/components/power-sensor/ina219.md +++ b/docs/components/power-sensor/ina219.md @@ -83,7 +83,7 @@ The following attributes are available for `INA219` sensors: | Attribute | Type | Inclusion | Description | | --------- | -----| --------- | ----------- | -| `i2c_bus` | integer | **Required** | The `number` of the [I2C bus](/components/board/#i2cs) that the sensor is connected to. | +| `i2c_bus` | integer | **Required** | The index of the I2C bus that the sensor is connected to. | | `i2c_addr` | integer | Optional | The sensor's unique [I2C address](https://learn.adafruit.com/i2c-addresses/overview).
Default: `0x40` | `max_current_amps` | float | Optional | Default: 3.2A. The maximum current that the sensor can measure in amperes (A). | `shunt_resistance` | float | Optional | Default: 0.1Ω. The shunt resistance value of the sensor in Ohms (Ω). diff --git a/docs/components/power-sensor/ina226.md b/docs/components/power-sensor/ina226.md index 2298b98e14..830a4558b4 100644 --- a/docs/components/power-sensor/ina226.md +++ b/docs/components/power-sensor/ina226.md @@ -81,7 +81,7 @@ The following attributes are available for `INA226` sensors: | Attribute | Type | Inclusion | Description | | --------- | -----| --------- | ----------- | -| `i2c_bus` | integer | **Required** | The `number` of the [I2C bus](/components/board/#i2cs) that the sensor is connected to. | +| `i2c_bus` | integer | **Required** | The index of the I2C bus that the sensor is connected to. | | `i2c_addr` | integer | Optional | Default: `0x40`. The sensor's unique [I2C address](https://learn.adafruit.com/i2c-addresses/overview). | | `max_current_amps` | number | Optional | Default: 20A. The maximum current that the sensor can measure in amperes (A). | `shunt_resistance` | number | Optional | Default: 0.1Ω. The shunt resistance value of the sensor in Ohms (Ω). diff --git a/docs/components/sensor/bme280.md b/docs/components/sensor/bme280.md index 77d4acd125..22eb46ec42 100644 --- a/docs/components/sensor/bme280.md +++ b/docs/components/sensor/bme280.md @@ -78,7 +78,7 @@ The following attributes are available for `bme280` sensors: | Attribute | Type | Inclusion | Description | | --------- | ---- | --------- | ---------- | -| `i2c_bus` | string | **Required** | The index of the [I2C bus](/components/board/#i2cs) on the board that the sensor is wired to. | +| `i2c_bus` | string | **Required** | The index of the I2C bus on the board that the sensor is wired to. | | `i2c_address` | string | Optional | Default: `0x77`. The [I2C device address](https://learn.adafruit.com/i2c-addresses/overview) of the sensor. | {{< readfile "/static/include/components/test-control/sensor-control.md" >}} diff --git a/docs/components/sensor/sensirion-sht3xd.md b/docs/components/sensor/sensirion-sht3xd.md index 9ce3d48c1b..0232bb2b97 100644 --- a/docs/components/sensor/sensirion-sht3xd.md +++ b/docs/components/sensor/sensirion-sht3xd.md @@ -79,7 +79,7 @@ The following attributes are available for `sensirion-sht3xd` sensors: | Attribute | Type | Inclusion | Description | | --------- | ---- | --------- | ----------- | -| `i2c_bus` | string | **Required** | The index of the [I2C bus](/components/board/#i2cs) on the board that the sensor is wired to. | +| `i2c_bus` | string | **Required** | The index of the I2C bus on the board that the sensor is wired to. | | `i2c_address` | string | Optional | The [I2C device address](https://learn.adafruit.com/i2c-addresses/overview) of the sensor.
Default: `0x44` | {{< readfile "/static/include/components/test-control/sensor-control.md" >}} diff --git a/static/include/components/board-attr-config.md b/static/include/components/board-attr-config.md index a8938acd85..2a10d382e5 100644 --- a/static/include/components/board-attr-config.md +++ b/static/include/components/board-attr-config.md @@ -11,18 +11,6 @@ Then remove and fill in the attributes as applicable to your board, according to "name": "", "pin": "" } - ], - "spis": [ - { - "name": "", - "bus_select": "" - } - ], - "i2cs": [ - { - "name": "", - "bus": "" - } ] } ``` diff --git a/static/include/components/board/board-analogs.md b/static/include/components/board/board-analogs.md index b2156af4c4..824956bb4c 100644 --- a/static/include/components/board/board-analogs.md +++ b/static/include/components/board/board-analogs.md @@ -3,7 +3,6 @@ An [analog-to-digital converter](https://www.electronics-tutorials.ws/combinatio ADCs are useful when building a robot, as they enable your board to read the analog signal output by most types of [sensors](/components/sensor/) and other hardware components. To integrate an ADC into your robot, you must first physically connect the pins on your ADC to your board. -If your ADC communicates with your board using [SPI](/components/board/#spis), you need to wire and configure the SPI bus in addition to the `analogs`. Then, integrate `analogs` into the `attributes` of your board by adding the following to your board's JSON configuration: diff --git a/static/include/components/board/board-i2cs.md b/static/include/components/board/board-i2cs.md deleted file mode 100644 index 383035f970..0000000000 --- a/static/include/components/board/board-i2cs.md +++ /dev/null @@ -1,66 +0,0 @@ -The [Inter-Integrated circuit (I2C)](https://learn.sparkfun.com/tutorials/i2c/all) serial communication protocol is similar to SPI, but requires two signal wires to exchange information between a controller and a peripheral device: - -- Serial Data: SDA -- Serial Clock: SCL - -To connect your board (controller) and a [component](/components/) that requires I2C communication (peripheral device), wire a connection between SDA and SCL pins on the board and component. - -{{% alert title="Important" color="note" %}} - -You must also enable I2C on your board if it is not enabled by default. -See your [board model's configuration instructions](/components/board/#supported-models) if applicable. - -{{% /alert %}} - -As supported boards have SDA and SCL pins internally configured to correspond with I2C bus indices, you can enable this connection in your board's configuration by specifying the index of the bus and giving it a name. - -Integrate `i2cs` into your robot in the `attributes` of your board as follows: - -{{< tabs name="Configure i2cs" >}} -{{% tab name="JSON Template" %}} - -```json {class="line-numbers linkable-line-numbers"} -// "attributes": { ... , -{ - "i2cs": [ - { - "name": "", - "bus": "" - } - ] -} -``` - -{{% /tab %}} -{{% tab name="JSON Example" %}} - -```json {class="line-numbers linkable-line-numbers"} -// "attributes": { ... , -{ - "i2cs": [ - { - "name": "bus1", - "bus": "1" - } - ] -} -``` - -{{% /tab %}} -{{< /tabs >}} - -The following properties are available for `i2cs`: - - -| Name | Type | Inclusion | Description | -| ---- | ---- | --------- | ----------- | -|`name`| string| **Required** | `name` of the I2C bus. | -|`bus`| string | **Required** | The index of the I2C bus. | - -{{% alert title="WIRING WITH I2C" color="tip" %}} - -Refer to your board's pinout diagram or data sheet for I2C bus indexes and corresponding SDA/SCL {{< glossary_tooltip term_id="pin-number" text="pin numbers" >}}. - -Refer to your peripheral device's data sheet for SDA/SCL pin layouts. - -{{% /alert %}} diff --git a/static/include/components/board/board-spis.md b/static/include/components/board/board-spis.md deleted file mode 100644 index 1ad29a0820..0000000000 --- a/static/include/components/board/board-spis.md +++ /dev/null @@ -1,63 +0,0 @@ -[Serial Peripheral Interface (SPI)](https://en.wikipedia.org/wiki/Serial_Peripheral_Interface) is a serial communication protocol that uses four [signal wires](https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi) to exchange information between a controller and peripheral devices: - -- Main Out/Secondary In: MOSI -- Main In/Secondary Out: MISO -- Clock, an oscillating signal line: SCLK -- Chip Select, with 1 line for each peripheral connected to controller: CS\* - -To connect your board (controller) and a [component](/components/) that requires SPI communication (peripheral device), wire a connection between CS and MOSI/MISO/SLCK pins on the board and component. - -{{% alert title="Important" color="note" %}} - -You must also enable SPI on your board if it is not enabled by default. -See your [board model's configuration instructions](/components/board/#supported-models) if applicable. - -{{% /alert %}} - -As supported boards have CS pins internally configured to correspond with SPI bus indices, you can enable this connection in your board's configuration by specifying the index of the bus at your CS pin's location and giving it a name. - -Integrate `spis` into your robot in the `attributes` of your board by adding the following to your board's JSON configuration: - -{{< tabs name="Configure a SPI Bus" >}} -{{% tab name="JSON Template" %}} - -```json {class="line-numbers linkable-line-numbers"} -// "attributes": { ... , -"spis": [ - { - "name": "", - "bus_select": "" - } -] -``` - -{{% /tab %}} -{{% tab name="JSON Example" %}} - -```json {class="line-numbers linkable-line-numbers"} -"spis": [ - { - "name": "main", - "bus_select": "0" - } -] -``` - -{{% /tab %}} -{{< /tabs >}} - -The following properties are available for `spis`: - - -| Name | Type | Inclusion | Description | -| ---- | ---- | --------- | ----------- | -|`name`| string | **Required** | The `name` of the SPI bus. | -|`bus_select`| string | **Required** | The index of the SPI bus. | - -{{% alert title="WIRING WITH SPI" color="tip" %}} - -Refer to your board's pinout diagram or data sheet for SPI bus indexes and corresponding CS/MOSI/MISO/SCLK {{< glossary_tooltip term_id="pin-number" text="pin numbers" >}}. - -Refer to your peripheral device's data sheet for CS/MOSI/MISO/SLCK pin layouts. - -{{% /alert %}}