Skip to content

Commit

Permalink
DOCS-2354: Finish analog response update (#3068)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Jun 25, 2024
1 parent 59bb377 commit cdcc58a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/appendix/apis/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ In addition to the [board API](#board), the [board component](/components/board/

In addition to the [board API](#board), the [board component](/components/board/) supports the following methods for interfacing with [ADCs](/components/board/#analogs) on a board:

{{< readfile "/static/include/components/apis/analogreader.md" >}}
{{< readfile "/static/include/components/apis/analog.md" >}}

### Digital interrupts

Expand Down
7 changes: 4 additions & 3 deletions docs/components/board/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ Additionally, the nested `GPIOPin`, `Analog`, and `DigitalInterrupt` interfaces

[`Analog`](#analog-api) API:

{{< readfile "/static/include/components/apis/analogreader.md" >}}
{{< readfile "/static/include/components/apis/analog.md" >}}

<br>

Expand Down Expand Up @@ -1072,7 +1072,8 @@ Read the current value from an analog pin or analog reader capable of reading an

**Returns:**

- [(Analog.Value)](https://python.viam.dev/autoapi/viam/components/board/index.html#viam.components.board.Board.Analog.Value): The result of reading an analog reader. It contains the raw data read as `value`, the reader’s minimum and maximum possible values as `min_range` and `max_range`, and its `step_size` (the minimum possible change between values it can read).
- [(Analog.Value)](https://python.viam.dev/autoapi/viam/components/board/index.html#viam.components.board.Board.Analog.Value): The result of reading an analog reader.
It contains the raw data read as `value`, the reader’s minimum and maximum possible values as `min_range` and `max_range`, and its `step_size` (the minimum possible change between values it can read).

For more information, see the [Python SDK Docs](https://python.viam.dev/autoapi/viam/components/board/index.html#viam.components.board.Board.Analog.read).

Expand Down Expand Up @@ -1113,7 +1114,7 @@ For more information, see the [Go SDK Docs](https://pkg.go.dev/go.viam.com/rdk/c
```go
myBoard, err := board.FromRobot(robot, "my_board")

// Get the Analog pin "my_example_analog".
// Get the analog pin "my_example_analog".
analog, err := myBoard.AnalogByName("my_example_analog")

// Get the value of the digital signal "my_example_analog" has most recently measured.
Expand Down
5 changes: 5 additions & 0 deletions static/include/components/apis/analog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- prettier-ignore -->
| Method Name | Description |
| ----------- | ----------- |
| [`Read`](/components/board/#read) | Read the current value of the digital signal output by an analog pin or ADC. |
| [`Write`](/components/board/#write) | Write an analog value to a pin on an SBC. |
5 changes: 0 additions & 5 deletions static/include/components/apis/analogreader.md

This file was deleted.

0 comments on commit cdcc58a

Please sign in to comment.