Skip to content

Commit

Permalink
DOCS-1511: Change JSON Template title in plant watering (#2334)
Browse files Browse the repository at this point in the history
  • Loading branch information
JessamyT authored Dec 19, 2023
1 parent 5d07fad commit 15a917e
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions docs/tutorials/projects/make-a-plant-watering-robot.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Follow this tutorial to learn how to set up an automatic plant watering system:

{{<youtube embed_url="https://www.youtube-nocookie.com/embed/Q6UuUKJpDn0?start=877">}}

You can also follow a simplified version of this tutorial in this video: it eliminates the need for the ADC, the breadboard, and the motor speed controller, and uses the digital pin of the moisture sensor to get “high” and “low” readings and to turn a relay on and off. You can start with this simple version and then add the ADC to make your machine more accurate!
You can also follow a simplified version of this tutorial in this video: it eliminates the need for the ADC, the breadboard, and the motor speed controller, and uses the digital pin of the moisture sensor to get “high” and “low” readings and to turn a relay on and off.
You can start with this simple version and then add the ADC to make your machine more accurate!

The tutorial uses the following hardware, but you can adjust it as needed:

Expand Down Expand Up @@ -279,7 +280,7 @@ First, add your Pi as a [board component](/components/board/) by creating a new
![Creation of a pi board in the Viam app config builder.](/tutorials/plant-watering-pi/pi-board-config-builder.png)

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

```json {class="line-numbers linkable-line-numbers"}
{
Expand Down Expand Up @@ -309,7 +310,7 @@ Set the motor's attributes **Max RPM** to `1000` and **PWM** to `12 GPIO 18` (th
![Creation of a pump motor in the Viam app config builder.](/tutorials/plant-watering-pi/pump-motor-config-builder.png)

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

```json {class="line-numbers linkable-line-numbers"}
// Board JSON ... },
Expand Down Expand Up @@ -347,7 +348,8 @@ _Resources_ refer to the different [components](/components/) and [services](/se
_Components_ refer to types of hardware, and each component's built-in `models` support the most common models of this hardware.
For example, the [sensor component](/components/sensor/) has an `ultrasonic` model built in for the ubiquitous [ultrasonic sensor](https://www.sparkfun.com/products/15569).

However, there are many different types of sensors used for sensing different things across the [Internet of Things](https://medium.com/@siddharth.parakh/the-complete-list-of-types-of-sensors-used-in-iot-63b4003ab6b3). Although the resistive soil moisture sensor is not currently one of Viam's built-in models, you can add an analog-to-digital-converter (ADC) as a module and use it to get readings from the moisture sensor.
However, there are many different types of sensors used for sensing different things across the [Internet of Things](https://medium.com/@siddharth.parakh/the-complete-list-of-types-of-sensors-used-in-iot-63b4003ab6b3).
Although the resistive soil moisture sensor is not currently one of Viam's built-in models, you can add an analog-to-digital-converter (ADC) as a module and use it to get readings from the moisture sensor.

A _module_ provides one or more {{< glossary_tooltip term_id="modular-resource" text="modular resources" >}}, which add resource types ([components](/components/) and [services](/services/)) or models that are not built into Viam.
A module can be added to your robot from the Viam registry.
Expand All @@ -357,10 +359,13 @@ You can add a module from the Viam registry directly from your robot’s Configu

Add the mcp300x-adc-sensor module to your robot in 3 steps:

1. Go to your robot's **Config** tab. Select **Create component**.
2. Search mcp300x. Click **Add module**.
1. Go to your robot's **Config** tab.
Select **Create component**.
2. Search mcp300x.
Click **Add module**.
3. Give your module a name of your choice, and click **Create** to add this module to your robot.
4. Find your module's card on the **Config** page. In **Attributes**, add the necessary attributes as `"channel_map"` and `"sensor_pin"`.
4. Find your module's card on the **Config** page.
In **Attributes**, add the necessary attributes as `"channel_map"` and `"sensor_pin"`.
For example, if you have a moisture sensor on channel 0, and your `sensor_pin` is 8, your configuration should look like this:

```json
Expand Down

0 comments on commit 15a917e

Please sign in to comment.