From cdcc58a367bcfc3f36d4ec755c354c506af64bcc Mon Sep 17 00:00:00 2001 From: JessamyT <75634662+JessamyT@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:33:44 -0700 Subject: [PATCH] DOCS-2354: Finish analog response update (#3068) --- docs/appendix/apis/_index.md | 2 +- docs/components/board/_index.md | 7 ++++--- static/include/components/apis/analog.md | 5 +++++ static/include/components/apis/analogreader.md | 5 ----- 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 static/include/components/apis/analog.md delete mode 100644 static/include/components/apis/analogreader.md diff --git a/docs/appendix/apis/_index.md b/docs/appendix/apis/_index.md index 421788fe92..2a96331d3c 100644 --- a/docs/appendix/apis/_index.md +++ b/docs/appendix/apis/_index.md @@ -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 diff --git a/docs/components/board/_index.md b/docs/components/board/_index.md index 3c09fdaa37..d16ed1d047 100644 --- a/docs/components/board/_index.md +++ b/docs/components/board/_index.md @@ -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" >}}
@@ -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). @@ -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. diff --git a/static/include/components/apis/analog.md b/static/include/components/apis/analog.md new file mode 100644 index 0000000000..232352f74d --- /dev/null +++ b/static/include/components/apis/analog.md @@ -0,0 +1,5 @@ + +| 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. | diff --git a/static/include/components/apis/analogreader.md b/static/include/components/apis/analogreader.md deleted file mode 100644 index 40a70490c3..0000000000 --- a/static/include/components/apis/analogreader.md +++ /dev/null @@ -1,5 +0,0 @@ - -| Method Name | Description | -| ----------- | ----------- | -| [`Read`](/components/board/#read) | Read the current integer value of the digital signal output by an analog pin or ADC. | -| [`Write`](/components/board/#write) | Write an analog value using a pin on an SBC capable of doing so. |