Skip to content

Commit

Permalink
DOCS-1512: Remove I2Cs and SPIs from tutorials and other places (#2321)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguequierre authored Dec 15, 2023
1 parent 3f3952c commit 8b2cca9
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 82 deletions.
Binary file removed assets/tutorials/scuttlebot/board.png
Binary file not shown.
Binary file modified assets/tutorials/scuttlebot/create-encoder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/appendix/glossary/board.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: Board
id: board
full_link: /components/board/
short_description: A board is the signal wire hub of a machine that provides access to GPIO pins, SPI or I2C.
short_description: A board is the signal wire hub of a machine that provides access to GPIO pins.
aka:
---

A board is the signal wire hub of a machine that provides access to GPIO pins, SPI or I2C.
A board is the signal wire hub of a machine that provides access to GPIO pins.

Examples of boards include Jetson, Raspberry Pi, Numato, or Arduino.

Expand Down
10 changes: 0 additions & 10 deletions docs/components/motor/tmc5072.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ This model supports stepper motors controlled by the [TMC5072 chip](https://www.

Whereas a basic low-level stepper driver supported by the [`gpiostepper` model](/components/motor/gpiostepper/) sends power to a stepper motor based on PWM signals from GPIO pins, the TMC5072 chip uses SPI bus to communicate with the board, does some processing on the chip itself, and provides convenient features including StallGuard2<sup>TM</sup>.

To configure a `TMC5072` motor as a component of your robot, first configure the [board](/components/board/) to which the motor driver is wired.
Then, add the motor:

{{< tabs >}}
{{% tab name="Config Builder" %}}

Expand Down Expand Up @@ -49,7 +46,6 @@ Edit and fill in the attributes as applicable.
"type": "motor",
"namespace": "rdk",
"attributes": {
"board": "<your-board-name>",
"spi_bus": "<your-spi-bus-index>",
"chip_select": "<pin-number>",
"index": "<your-terminal-index>",
Expand All @@ -74,12 +70,6 @@ Edit and fill in the attributes as applicable.
```json
{
"components": [
{
"name": "example-board",
"model": "pi",
"type": "board",
"namespace": "rdk"
},
{
"name": "my-tmc-motor",
"model": "TMC5072",
Expand Down
2 changes: 0 additions & 2 deletions docs/components/sensor/sensirion-sht3xd.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ Then remove and fill in the attributes as applicable to your sensor, according t

```json {class="line-numbers linkable-line-numbers"}
{
"board": "<your-board-name>",
"i2c_bus": "<your-i2c-bus-index-on-board>"
}
```
Expand All @@ -42,7 +41,6 @@ Then remove and fill in the attributes as applicable to your sensor, according t

```json {class="line-numbers linkable-line-numbers"}
{
"board": "local",
"i2c_bus": "2"
}
```
Expand Down
57 changes: 5 additions & 52 deletions docs/tutorials/configure/scuttlebot.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,48 +34,9 @@ cost: 540

![A SCUTTLE robot on a carpeted floor.](/tutorials/scuttlebot/scuttle-on-floor.png)

## Configure the board

Add your first component, the [board](/components/board/):

{{< tabs name="Configure an pi Board" >}}
{{% tab name="Config Builder" %}}

Click on the **Components** subtab and click **Create component**.
Select the `board` type, then select the `pi` model.
Enter `local` as the name for your board and click **Create**.

Click on **Show more** and add `I2C` with **name** `main` and **bus** `1`.

![The component configuration panel for a board component.](/tutorials/scuttlebot/board.png)

{{% /tab %}}
{{% tab name="Raw JSON" %}}

Add the following JSON object to the `components` array:

```json {class="line-numbers linkable-line-numbers"}
{
"type": "board",
"model": "pi",
"name": "local",
"attributes": {
"i2cs": [
{
"bus": "1",
"name": "main"
}
]
}
}
```

{{% /tab %}}
{{< /tabs >}}

## Configure the encoders

Next, configure the left and right encoders as follows:
Configure the left and right encoders as follows:

{{< tabs name="Configure AMS-AS5048 Encoders" >}}
{{% tab name="Config Builder" %}}
Expand All @@ -88,7 +49,7 @@ Enter `lenc` as the name for your encoder and click **Create**.

Click the **board** dropdown list and select the name of your board, `local`.

In the **i2c bus** field type `main`, and in the **i2c address** field type `64`.
In the **i2c bus** field type `1`, and in the **i2c address** field type `64`.

![Configuration of an AMS-AS5048 encoder in the Viam app config builder.](/tutorials/scuttlebot/create-encoder.png)

Expand All @@ -100,7 +61,7 @@ Enter `renc` as the name for your encoder and click **Create**.

Click the **board** dropdown list and select the name of your board, `local`.

In the **i2c bus** field type `main`, and in the **i2c address** field type `65`.
In the **i2c bus** field type `1`, and in the **i2c address** field type `65`.

Click **Save config**.

Expand All @@ -116,10 +77,9 @@ Add the following JSON objects to the `components` array:
"type": "encoder",
"namespace": "rdk",
"attributes": {
"board": "local",
"connection_type": "i2c",
"i2c_attributes": {
"i2c_bus": "main",
"i2c_bus": "1",
"i2c_addr": 64
}
}
Expand All @@ -130,10 +90,9 @@ Add the following JSON objects to the `components` array:
"type": "encoder",
"namespace": "rdk",
"attributes": {
"board": "local",
"connection_type": "i2c",
"i2c_attributes": {
"i2c_bus": "main",
"i2c_bus": "1",
"i2c_addr": 65
}
}
Expand Down Expand Up @@ -283,12 +242,6 @@ Enter a name for your base and click **Create**.
```json
{
"components": [
{
"attributes": {},
"model": "pi",
"name": "local",
"type": "board"
},
{
"attributes": {
"board": "local",
Expand Down
18 changes: 2 additions & 16 deletions docs/tutorials/projects/tipsy.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,7 @@ On the [`Raw JSON` tab](/build/configure/#the-config-tab), replace the configura
"model": "pi",
"name": "local",
"type": "board",
"attributes": {
"i2cs": [
{
"bus": "1",
"name": "default_i2c"
}
]
},
"attributes": {},
"depends_on": []
},
{
Expand Down Expand Up @@ -424,14 +417,7 @@ On the [`Raw JSON` tab](/build/configure/#the-config-tab), replace the configura
"model": "pi",
"name": "local",
"type": "board",
"attributes": {
"i2cs": [
{
"bus": "1",
"name": "default_i2c"
}
]
},
"attributes": {},
"depends_on": []
},
{
Expand Down

0 comments on commit 8b2cca9

Please sign in to comment.