Skip to content

Commit

Permalink
DOCS-1459: Remove i2cs and SPIs (#2319)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguequierre authored Dec 13, 2023
1 parent 33a33ac commit c00f354
Show file tree
Hide file tree
Showing 22 changed files with 26 additions and 273 deletions.
2 changes: 1 addition & 1 deletion docs/appendix/glossary/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion docs/build/micro-rdk/movement-sensor/gyro-mpu6050.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [I<sup>2</sup>C bus configured](/components/board/#i2cs) on your [board](/components/board/) wired to this device. |
| `i2c_bus` | string | **Required** | The `name` of the I<sup>2</sup>C 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`. <br> Default: `false` |

## Test the movement sensor
Expand Down
12 changes: 2 additions & 10 deletions docs/components/board/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 I<sup>2</sup>C Interface](https://www.adafruit.com/product/815), a 16-channel [I<sup>2</sup>C](#i2cs) [PWM](https://docs.arduino.cc/learn/microcontrollers/analog-output)/[servo](/components/servo/) driver peripheral |
| [`pca9685`](pca9685/) | [PCA9685 Arduino I<sup>2</sup>C Interface](https://www.adafruit.com/product/815), a 16-channel I<sup>2</sup>C [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 |

Expand All @@ -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 [I<sup>2</sup>C](#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`

Expand All @@ -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.
Expand Down
12 changes: 1 addition & 11 deletions docs/components/board/beaglebone.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (I<sup>2</sup>C) 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 [I<sup>2</sup>C](#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" >}}
12 changes: 1 addition & 11 deletions docs/components/board/fake.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [I<sup>2</sup>C](#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`

Expand All @@ -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" >}}
18 changes: 1 addition & 17 deletions docs/components/board/jetson.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
Expand All @@ -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 (I<sup>2</sup>C) 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 [I<sup>2</sup>C](#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" >}}
30 changes: 1 addition & 29 deletions docs/components/board/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ Then remove and fill in the attributes as applicable to your board, according to
"pin": "<pin-number>",
"type": "<basic|servo>"
}
],
"spis": [
{
"name": "<your-bus-name>",
"bus_select": "<your-bus-index>"
}
],
"i2cs": [
{
"name": "<your-bus-name>",
"bus": "<your-bus-index>"
}
]
}
```
Expand Down Expand Up @@ -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": []
Expand All @@ -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 (I<sup>2</sup>C) 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 I<sup>2</sup>C 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 [I<sup>2</sup>C](#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`

Expand All @@ -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" >}}
18 changes: 1 addition & 17 deletions docs/components/board/ti.md
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
Expand All @@ -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 (I<sup>2</sup>C) 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 [I<sup>2</sup>C](#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" >}}
31 changes: 7 additions & 24 deletions docs/components/board/upboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@ Then remove and fill in the attributes as applicable to your board, according to
"name": "<your-digital-interrupt-name>",
"pin": "<pin-number>"
}
],
"i2cs": [
{
"name": "<your-bus-name>",
"bus": "<your-bus-index>"
}
]
}
```
Expand All @@ -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"
}
]
}
Expand All @@ -93,12 +87,6 @@ Then remove and fill in the attributes as applicable to your board, according to
"name": "<your-digital-interrupt-name>",
"pin": "<pin-number>"
}
],
"i2cs": [
{
"name": "<your-bus-name>",
"bus": "<your-bus-index>"
}
]
},
"depends_on": []
Expand All @@ -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"
}
]
},
Expand All @@ -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 (I<sup>2</sup>C) 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 [I<sup>2</sup>C](#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" >}}
4 changes: 2 additions & 2 deletions docs/components/encoder/ams-as5048.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [I<sup>2</sup>C](/components/board/#i2cs) or [SPI](/components/board/#spis) interface to connect.
This is an absolute encoder that uses an I<sup>2</sup>C 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.
Expand Down Expand Up @@ -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 [I<sup>2</sup>C](/components/board/#i2cs) connection: <ul> <li> <code>i2c_bus</code>: The index of the [I<sup>2</sup>C bus configured](/components/board/#i2cs) on the [board](/components/board/) wired to this encoder. <br> Example: `"1"` </li> <li> <code>i2c_addr</code>: The address of the bus. <br> Example: `64` </li> </ul> |
| `i2c_attributes` | object | **Required** | The attributes to configure the I<sup>2</sup>C connection: <ul> <li> <code>i2c_bus</code>: The index of the I<sup>2</sup>C bus on the [board](/components/board/) wired to this encoder. <br> Example: `"1"` </li> <li> <code>i2c_addr</code>: The address of the bus. <br> Example: `64` </li> </ul> |

{{< readfile "/static/include/components/test-control/encoder-control.md" >}}
2 changes: 1 addition & 1 deletion docs/components/movement-sensor/gps/gps-nmea-rtk-pmtk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 I<sup>2</sup>C address. |
| `i2c_bus` | string | **Required** | The index of the [I<sup>2</sup>C bus](/components/board/#i2cs) of the board wired to the sensor. |
| `i2c_bus` | string | **Required** | The index of the I<sup>2</sup>C bus of the board wired to the sensor. |
| `i2c_baud_rate` | int | Optional | The rate at which data is sent from the sensor. Optional. <br> 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/components/movement-sensor/gps/gps-nmea.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ For a movement sensor communicating over I<sup>2</sup>C, you'll need a `i2c_attr
<!-- prettier-ignore -->
| Name | Type | Inclusion | Description |
| --------------- | ------ | ------------ | ------------------------ |
| `i2c_bus` | string | **Required** | The index of the [I<sup>2</sup>C bus](/components/board/#i2cs) on the board wired to the sensor. |
| `i2c_bus` | string | **Required** | The index of the I<sup>2</sup>C bus on the board wired to the sensor. |
| `i2c_addr` | int | **Required** | The device's I<sup>2</sup>C address. |
| `i2c_baud_rate` | int | Optional | The rate at which data is sent from the sensor. Optional. <br> Default: `38400` |

Expand Down
Loading

0 comments on commit c00f354

Please sign in to comment.