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-1468: Add use case for building a simple machine #2343

Merged
merged 3 commits into from
Dec 20, 2023
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
Binary file added assets/use-cases/new-machine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/use-cases/signup-narrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/build/configure/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aliases:

Before you can program a robot, you must configure it.

A robot's configuration tells the code running the robot what _resources_ (hardware _components_ and software _services_) it has access to, as well as any relevant parameters for those resources.
A robot's configuration tells the code running the robot what _{{< glossary_tooltip term_id="resource" text="resources" >}}_ (hardware _{{< glossary_tooltip term_id="component" text="components" >}}_ and software _{{< glossary_tooltip term_id="service" text="services" >}}_) it has access to, as well as any relevant parameters for those resources.

To start configuring, go to the [Viam app](https://app.viam.com), create a new robot and follow the steps on your new robot’s **Setup** tab.

Expand Down
66 changes: 64 additions & 2 deletions docs/use-cases/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,68 @@ title: "Build a simple smart machine"
linkTitle: "Build simple smart machines"
weight: 10
type: "docs"
layout: "empty"
canonical: "build/configure/"
description: "Build a simple smart machine in a few steps using Viam's modular system of components and services without writing much or any code."
tags: ["components", "configuration"]
---

You can get a smart machine running with Viam in just a few steps.

Viam's modular system of {{< glossary_tooltip term_id="component" text="components" >}} and {{< glossary_tooltip term_id="service" text="services" >}} means that you can start doing interesting things with your machine without writing much or any code.

<table>
<tr>
<th>{{<imgproc src="/use-cases/signup-narrow.png" class="fill alignleft" resize="500x" style="max-width: 200px" declaredimensions=true alt="Viam app login screen.">}}
<b>1. Create a machine in the Viam app</b><br><br>
<p>First, <a href="https://app.viam.com/">create a Viam account</a> if you haven't already. Log in.</p>
<p>Then create a machine by typing in a name and clicking <strong>Add machine</strong>.</p>
<p>{{<imgproc src="/use-cases/new-machine.png" class="fill aligncenter" resize="400x" style="max-width: 250px" declaredimensions=true alt="Viam app login screen.">}}</p>
</th>
</tr>
<tr>
<th>{{<imgproc src="/services/icons/data-capture.svg" class="fill alignright" style="max-width: 150px" declaredimensions=true alt="Installation icon">}}
<b>2. Install Viam on your machine</b><br><br>
<p>All of the software that runs your smart machine is packaged into a binary called <code>viam-server</code>.
Install it on the computer controlling your smart machine by following the steps on your machine's <strong>Setup</strong> tab in the <a href="https://app.viam.com/">Viam app</a>.</p>
</th>
</tr>
<tr>
<th>{{<imgproc src="/icons/components.png" class="fill alignleft" resize="400x" style="max-width: 220px" declaredimensions=true alt="An assortment of components.">}}
<b>3. Configure your components</b><br><br>
<p>Each piece of your smart machine that is controlled by a computer is called a <i>component</i>. For example, if your smart machine includes a Raspberry Pi, a motor, and a camera, each of those is a component.</p>
<p>You need to <i><a href="/build/configure/">configure</a></i> your machine so that <code>viam-server</code> can interact with its hardware. Use the configuration builder tool in the Viam app to create a file that describes what hardware you are using and how it is connected.
For example, if you have a DC motor, follow the <a href="/components/motor/gpio/">corresponding configuration instructions</a> to tell the software which pins it is connected to.</p>
</th>
</tr>
<tr>
<th>{{<gif webm_src="/manage/control.webm" mp4_src="/manage/control.mp4" alt="The Viam app Control tab with a control panel for each component. The panel for a DC motor is clicked, expanding to show power controls." max-width="400px" class="fill alignleft">}}
<b>4. Test your components</b><br><br>
<p>When you configure a component, a remote control panel is generated for it in the <b>Control</b> tab of the Viam app. With the panels, you can drive motors at different speeds, view your camera feeds, see sensor readings, and generally test the basic functionality of your robot before you've even written any code.
</p>
</th>
</tr>
<tr>
<th>{{<imgproc src="/ml/collect.svg" class="fill alignright" style="max-width: 220px" declaredimensions=true alt="Services">}}
<b>5. Configure services</b><br><br>
<p>Services are built-in Viam software packages that add high-level functionality to your smart machine like computer vision or motion planning.
If you want to use any services, see their <a href="/services/">documentation</a> for configuration and usage information.
If you are making a simple machine that doesn't use services, you can skip this step!
</p>
</th>
</tr>
<tr>
<th>{{<imgproc src="/ml/configure.svg" class="fill alignleft" style="max-width: 210px" declaredimensions=true alt="Services">}}
<b>6. Do more with code</b><br><br>
<p>Write a program to control your smart machine using the programming language of your choice. Viam has <a href="/sdks/">SDKs</a> for Python, Golang, C++, TypeScript and Flutter.</p>
<p>The easiest way to get started is to copy the auto-generated boilerplate code from your machine's <b>Code sample</b> tab in the Viam app. You can run this code directly on the machine or from a separate computer; it will connect to the machine using API keys.</p>
</th>
</tr>
</table>

## Next steps

{{< cards >}}
{{% card link="/get-started/try-viam/" %}}
{{% card link="/tutorials/get-started/lazy-susan/" %}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{% card link="/tutorials/get-started/lazy-susan/" %}}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought this or mouse mover would be a good example of a very simple machine that moves things instead of just blinking the led--what's your thought? Is there another one you'd recommend replacing this with?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just think 4 is a bit much so that's why I tried to eliminate one but ok to keep 4. I don't feel that strongly

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay i like the 4 because then they make a nice square instead of an upside-down L shape (depending on screen width) and they're all different so I think I'll leave as-is if that's ok!

{{% card link="/tutorials/get-started/blink-an-led/" %}}
{{% card link="/tutorials/services/color-detection-scuttle/" %}}
{{< /cards >}}
Loading