Skip to content

Commit d8c8af6

Browse files
committed
Updates
1 parent 3761d4b commit d8c8af6

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

docs/tutorials/control/air-quality-fleet.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cost: 200
2424
---
2525

2626
In this tutorial you will learn how to set up a fleet of devices for yourself or third parties to collect air quality data.
27-
You will then create a web app that shows the most recent reading for any device a user has access to.
27+
You will then create a web application that shows the most recent reading for any device a user has access to.
2828

2929
{{< alert title="Learning Goals" color="info" >}}
3030

@@ -59,20 +59,20 @@ In this section we'll set up one air sensing machine as our development device.
5959
{{< table >}}
6060
{{% tablestep number=1 %}}
6161

62-
Navigate to the [Viam app](https://app.viam.com) in a web browser.
62+
Navigate to [Viam](https://app.viam.com) in a web browser.
6363
Create an account and log in.
6464

6565
{{% /tablestep %}}
6666
{{% tablestep number=2 %}}
6767

68-
Click the dropdown in the upper-right corner of the **FLEET** page and use the **+** button to create a new organization for your air quality machine company.
68+
Click the dropdown in the upper-right corner of the **FLEET** page and use the **+** button to create a new {{< glossary_tooltip term_id="organization" text="organization" >}} for your air quality machine company.
6969
Name the organization and click **Create**.
7070

7171
{{% /tablestep %}}
7272
{{% tablestep number=3 %}}
7373

7474
Click **FLEET** in the upper-left corner of the page and click **LOCATIONS**.
75-
A new location called `First Location` is automatically generated for you.
75+
A new {{< glossary_tooltip term_id="location" text="location" >}} called `First Location` is automatically generated for you.
7676
Use the **...** menu next to edit the location name to `Development`, then click **Save**.
7777

7878
{{% /tablestep %}}
@@ -90,8 +90,8 @@ For example, if you are using a Raspberry Pi, SSH to it and [enable serial commu
9090
{{% /tablestep %}}
9191
{{% tablestep number=5 %}}
9292

93-
Add a new [_{{< glossary_tooltip term_id="machine" text="machine" >}}_](/operate/get-started/basics/#what-is-a-machine) using the button in the top right corner of the **LOCATIONS** tab in the app.
94-
Follow the **Set up your machine part** instructions to install `viam-server` on the machine and connect it to the Viam app.
93+
Add a new [_{{< glossary_tooltip term_id="machine" text="machine" >}}_](/operate/get-started/basics/#what-is-a-machine) using the button in the top right corner of the **LOCATIONS** tab.
94+
Follow the **Set up your machine part** instructions to install `viam-server` on the machine and connect it to Viam.
9595

9696
When your machine shows as connected, continue to the next step.
9797

@@ -205,7 +205,7 @@ Let's create a dashboard for its measurements next.
205205

206206
The [Viam TypeScript SDK](https://ts.viam.dev/) allows you to build custom web interfaces to interact with your machines.
207207
For this project, you'll use it to build a page that displays air quality sensor data for a given location.
208-
You'll host the website on Viam Apps.
208+
You'll host the website as a Viam Application.
209209

210210
The full code is available for reference on [GitHub](https://github.com/viam-labs/air-quality-fleet/blob/main/main.ts).
211211

@@ -276,12 +276,12 @@ npm install
276276
{{% /tablestep %}}
277277
{{< /table >}}
278278

279-
### Access machines from your app
279+
### Access machines from your application
280280

281-
Viam apps provide access to a machine by placing its API key in your local storage.
281+
Viam applications provide access to a machine by placing its API key in your local storage.
282282
You can access the data from your browser's local storage with the following code.
283283

284-
Currently, Viam apps only provide access to single machines but in future you will be able to access entire locations or organizations.
284+
Currently, Viam applications only provide access to single machines but in future you will be able to access entire locations or organizations.
285285

286286
{{< table >}}
287287
{{% tablestep number=1 %}}
@@ -335,7 +335,7 @@ document.addEventListener("DOMContentLoaded", async () => {
335335
{{% /tablestep %}}
336336
{{% tablestep number=2 %}}
337337

338-
For developing your app on localhost, **add the same information to your browser's local storage**.
338+
For developing your application on localhost, **add the same information to your browser's local storage**.
339339

340340
Navigate to [Camera Viewer](https://air-quality_naomi.viamapplications.com/) and log in, then select your development machine.
341341

@@ -404,13 +404,13 @@ console.log("Set 2 cookies on localhost");
404404
{{% /tablestep %}}
405405
{{% tablestep number=4 %}}
406406

407-
Run the following command to serve the app you are building:
407+
Run the following command to serve the application you are building:
408408

409409
```sh {class="command-line" data-prompt="$" data-output="2-10"}
410410
npm run start
411411
```
412412

413-
Open the app in your browser at `http://127.0.0.1:8000/`.
413+
Open the application in your browser at `http://127.0.0.1:8000/`.
414414

415415
Then, open developer tools, go to the console and paste the copied JavaScript code to set your cookies.
416416

@@ -424,7 +424,8 @@ Now that you have the connection code, you are ready to add code that establishe
424424
{{< table >}}
425425
{{% tablestep number=1 %}}
426426

427-
You'll first create a client to obtain the organization and location ID. Then you'll get a `dataClient` instance which accesses all the data in your location, and then query this data to get only the data tagged with the `air-quality` tag you applied with your data service configuration.
427+
You'll first create a client to obtain the organization and location ID.
428+
Then you'll get a `dataClient` instance which accesses all the data in your location, and then query this data to get only the data tagged with the `air-quality` tag you applied with your data service configuration.
428429
The following code also queries the data for a list of the machines that have collected air quality data so that later, depending on the API key used with the code, your dashboard can show the data from any number of machines.
429430

430431
Paste the following code into the main function of your <file>main.ts</file> script, directly after the `locationID` line, in place of `// <Insert data client and query code here in later steps>`:
@@ -753,9 +754,9 @@ You can find all the code in the [GitHub repo for this tutorial](https://github.
753754
Great work.
754755
You've learned how to configure a machine and you can view its data in a custom TypeScript dashboard.
755756

756-
### Deploy the app to Viam apps
757+
### Deploy the application as a Viam application
757758

758-
Let's deploy this dashboard so you don't have to run it locally.
759+
Let's deploy this dashboard as a Viam-hosted application so you don't have to run it locally.
759760
This will also allow others to use the dashboard.
760761

761762
{{< table >}}
@@ -779,7 +780,7 @@ This will also allow others to use the dashboard.
779780
}
780781
```
781782

782-
In the [Viam app](https://app.viam.com), navigate to your organization settings through the menu in upper right corner of the page.
783+
In [Viam](https://app.viam.com), navigate to your organization settings through the menu in upper right corner of the page.
783784
Find the **Public namespace** and copy that string.
784785
Replace `<your-namespace>` with your public namespace.
785786

@@ -808,7 +809,7 @@ For subsequent updates run these commands again with an updated version number.
808809
{{% /tablestep %}}
809810
{{% tablestep number=4 %}}
810811

811-
**Try your app** by navigating to:
812+
**Try your application** by navigating to:
812813

813814
```txt
814815
https://air-quality_your-public-namespace.viamapplications.com
@@ -875,9 +876,9 @@ In other words, you want to provision devices.
875876

876877
Before an air sensing machine leaves your factory, you'd complete the following steps:
877878

878-
1. You'd flash the single-board computer with an operating system
879-
2. You'd install `viam-agent`
880-
3. You'd provide a machine configuration template, a fragment.
879+
1. You'd flash the single-board computer with an operating system.
880+
2. You'd install `viam-agent`.
881+
3. You'd provide a machine configuration template: a _{{< glossary_tooltip term_id="fragment" text="fragment" >}}_.
881882

882883
Once a customer receives your machine, they will:
883884

0 commit comments

Comments
 (0)