Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-2354: Finish analog response update #3068

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading