Skip to content

Commit d431b67

Browse files
IanWhalenclaudeshannonbradshaw
authored
Trim Raspberry Pi setup guide and split out standalone docs (#4826)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Shannon Bradshaw <shannon.bradshaw@gmail.com>
1 parent bb77839 commit d431b67

6 files changed

Lines changed: 54 additions & 126 deletions

File tree

docs/dev/reference/try-viam/rover-resources/rover-tutorial-1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ This is the recommended order to assemble your rover:
169169

170170
Install a 64-bit Raspberry Pi OS onto your Pi following our [Raspberry Pi installation guide](/operate/reference/prepare/rpi-setup/).
171171
Follow all steps as listed.
172-
When you get to the [Enable communication protocols step](/operate/reference/prepare/rpi-setup/#enable-communication-protocols), you must enable I<sup>2</sup>C so that your Pi can communicate with the accelerometer on your rover.
172+
You must also enable I<sup>2</sup>C on your Pi using `sudo raspi-config` so that your Pi can communicate with the accelerometer on your rover.
173173

174174
### Attach the Raspberry Pi to the Rover
175175

docs/dev/reference/try-viam/rover-resources/rover-tutorial/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ If you are using another board, you can skip this step.
220220

221221
Install a 64-bit Raspberry Pi OS onto your Pi following our [Raspberry Pi installation guide](/operate/reference/prepare/rpi-setup/).
222222
Follow all steps as listed.
223-
When you get to the [Enable communication protocols step](/operate/reference/prepare/rpi-setup/#enable-communication-protocols), you must enable I<sup>2</sup>C so that your Pi can communicate with the accelerometer and power sensor on your rover.
223+
You must also enable I<sup>2</sup>C on your Pi using `sudo raspi-config` so that your Pi can communicate with the accelerometer and power sensor on your rover.
224224
Once you have installed Raspberry Pi OS and `viam-server`, put your SD card in the slot on your Pi.
225225

226226
### Add the power supply

docs/operate/reference/prepare/rpi-setup.md

Lines changed: 5 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ aliases:
1313
- /installation/prepare/rpi-setup/
1414
- /get-started/installation/prepare/rpi-setup/
1515
- /get-started/prepare/rpi-setup/
16+
- /operate/reference/prepare/rpi-enable-protocols/
17+
- /operate/reference/prepare/wifi-credentials/
1618
# SME: James
1719
date: "2022-01-01"
1820
# updated: "" # When the content was last entirely checked
@@ -23,7 +25,7 @@ date: "2022-01-01"
2325
We recommend using Viam on a 64-bit Linux distribution.
2426
Support for older Raspberry Pis running on 32-bit ARM v7 is in beta.
2527

26-
If you already have a Linux distribution installed on your {{< glossary_tooltip term_id="pi" text="Pi" >}}, skip ahead to [enable the required communication protocols for your hardware](#enable-communication-protocols).
28+
If you already have a Linux distribution installed on your {{< glossary_tooltip term_id="pi" text="Pi" >}}, you can skip ahead to [install `viam-server`](/operate/install/setup/).
2729

2830
{{% expand "Click to check whether the Linux installation on your Raspberry Pi is 64-bit or 32-bit" %}}
2931

@@ -33,7 +35,7 @@ Example output:
3335

3436
{{< imgproc alt="Screenshot of a terminal running the 'lscpu' command. The output lists of this command on a Raspberry Pi. A red box highlights the command and the top of the output which reads 'Architecture: aarch64.'" src="/installation/rpi-setup/lscpu-output.png" resize="800x" declaredimensions=true class="shadow" >}}
3537

36-
If the value of "Architecture: _'xxxxxx'_" ends in "64", you can skip ahead to [enable the required communication protocols for your hardware](#enable-communication-protocols).
38+
If the value of "Architecture: _'xxxxxx'_" ends in "64", you can skip ahead to [install `viam-server`](/operate/install/setup/).
3739

3840
{{% /expand%}}
3941

@@ -182,129 +184,10 @@ While the Imager is flashing your microSD card, we recommend reading [How to thi
182184
2. Place the SD card into your Raspberry Pi and boot the Pi by plugging it in to an outlet.
183185
A red LED will turn on to indicate that the Pi is connected to power.
184186

185-
## Connect with SSH
186-
187-
Once your Raspberry Pi is plugged in and turned on, wait a minute to let your Pi boot up.
188-
189-
Launch your terminal on your computer and run this command:
190-
191-
{{% alert title="Tip" color="tip" %}}
192-
The text in <> should be replaced (including the < and > symbols themselves) with the user and hostname you configured when you set up your Pi.
193-
194-
Example: if your username is 'Robota' and your hostname is 'my-machine': then it should be `ssh Robota@my-machine.local`
195-
196-
{{% /alert %}}
197-
198-
```sh {class="command-line" data-prompt="$"}
199-
ssh <USERNAME>@<HOSTNAME>.local
200-
```
201-
202-
If you are prompted "Are you sure you want to continue connecting?", type "yes" and hit enter.
203-
Then, enter your password.
204-
You should be greeted by a login message and a command prompt.
205-
206-
Next, it's good practice to update your Raspberry Pi to ensure all the latest packages are installed:
207-
208-
```sh {class="command-line" data-prompt="$"}
209-
sudo apt update
210-
sudo apt upgrade
211-
```
212-
213-
## Enable communication protocols
214-
215-
Certain hardware, such as analog-to-digital converters (ADCs), accelerometers, and sensors, communicates with your Pi using specialized communications protocols, including I2C, SPI, serial, or one-wire protocols.
216-
If you are using hardware that requires these protocols, you must enable support for them on your Pi using `raspi-config`:
217-
218-
1. Launch the configuration tool by running the following command:
219-
220-
```sh {class="command-line" data-prompt="$"}
221-
sudo raspi-config
222-
```
223-
224-
1. Use your keyboard to select "Interface Options", and press return.
225-
226-
{{<imgproc alt="Screenshot of the Raspi Config screen with a red box and red arrow pointing to the '3 Interface Options' option where you can find the I2C and other drivers" src="/installation/rpi-setup/installation-raspberry-pi-i2c-raspiconfig-interface-options.png" resize="800x" declaredimensions=true class="shadow" >}}
227-
228-
1. Enable the relevant protocols to support your specific hardware. For example:
229-
230-
- If you are using an analog-to-digital converter (ADC), motor, or other device that requires the SPI protocol, enable **SPI**.
231-
- If you are using an accelerometer, sensor, or other device that requires the I<sup>2</sup>C protocol, enable **I2C**.
232-
- If you are using a sensor, motor, or other device that communicates over the serial port, enable **Serial Port**.
233-
234-
Check the documentation for your specific component to verify the communication protocols it requires.
235-
236-
1. Then, to apply the changes, restart your Raspberry Pi if it hasn't already prompted you to do so.
237-
238-
```sh {class="command-line" data-prompt="$"}
239-
sudo reboot
240-
```
241-
242187
## Next steps
243188

244-
You have now installed an operating system on your Raspberry Pi.
245-
To use your Raspberry pi, follow the [setup guide](/operate/install/setup/):
189+
Continue setting up `viam-server` on your Raspberry Pi in [the Viam app](https://app.viam.com/):
246190

247191
{{< cards >}}
248192
{{% card link="/operate/install/setup/" %}}
249193
{{< /cards >}}
250-
251-
## Troubleshooting
252-
253-
### Write error when imaging Raspberry Pi OS
254-
255-
If you experience the error `Verifying write failed. Contents of SD card is different from what was written to it` when imaging your Raspberry Pi with the Imager in step 5, there might be an issue with your micro SD card reader.
256-
257-
Try a different micro SD card reader, or use a different USB port on your computer.
258-
259-
If you are connecting your SD card reader to your computer through a USB hub, try connecting directly it to your computer instead.
260-
261-
### Error: can't read from I2C address
262-
263-
If you see the error `error: can't read from I2C address` in your logs after installing `viam-server`, you need to enable `I2C` support on your Raspberry Pi.
264-
You can use the command `sudo journalctl --unit=viam-server` to read through the `viam-server` log file.
265-
Follow the instructions to [enable communication protocols](#enable-communication-protocols) on your Pi to resolve this error.
266-
267-
### Add additional WiFi credentials
268-
269-
If you move your machine to a different WiFi network, you will have to update the WiFi credentials.
270-
271-
You can update the WiFi configuration by creating a new `wpa_supplicant.conf` file on the "boot" partition.
272-
273-
The steps are explained below.
274-
275-
1. Plug your Pi's microSD card into your computer and create a plain text file called `wpa_supplicant.conf`.
276-
277-
2. Paste the following example into the file, replacing "Name of your wireless LAN" and "Password for your wireless LAN" with your credentials.
278-
Be sure to use UNIX (LF) line breaks in your text editor.
279-
280-
3. Save the file and eject the microSD card.
281-
282-
4. Put the microSD card back into the Pi and boot the Pi.
283-
284-
The `wpa_supplicant.conf` file will be read by the Pi on boot, and the file will disappear but the WiFi credentials will be updated.
285-
286-
You can duplicate the "network" section to add additional WiFi networks (for example your work, and your home).
287-
288-
The "priority" attribute is optional and can be used to prioritize networks if multiple networks are configured (higher numbers are prioritized).
289-
290-
```bash {class="line-numbers linkable-line-numbers"}
291-
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
292-
update_config=1
293-
country=us
294-
295-
network={
296-
ssid="Name of your wireless LAN"
297-
psk="Password for your wireless LAN"
298-
priority=10
299-
}
300-
301-
network={
302-
ssid="Name of your other wireless LAN"
303-
psk="Password for your other wireless LAN"
304-
priority=20
305-
}
306-
```
307-
308-
### Additional troubleshooting
309-
310-
You can find additional assistance in the [Troubleshooting section](/manage/troubleshoot/troubleshoot/).
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
title: "Add WiFi Credentials to a Raspberry Pi"
3+
linkTitle: "Add WiFi Credentials"
4+
weight: 96
5+
type: "docs"
6+
description: "Update or add WiFi network credentials on a Raspberry Pi."
7+
date: "2022-01-01"
8+
---
9+
10+
If you move your Raspberry Pi to a different WiFi network, you will have to update the WiFi credentials.
11+
12+
You can update the WiFi configuration by creating a new `wpa_supplicant.conf` file on the "boot" partition:
13+
14+
1. Plug your Pi's microSD card into your computer and create a plain text file called `wpa_supplicant.conf`.
15+
16+
2. Paste the following example into the file, replacing "Name of your wireless LAN" and "Password for your wireless LAN" with your credentials.
17+
Be sure to use UNIX (LF) line breaks in your text editor.
18+
19+
3. Save the file and eject the microSD card.
20+
21+
4. Put the microSD card back into the Pi and boot the Pi.
22+
23+
The `wpa_supplicant.conf` file will be read by the Pi on boot, and the file will disappear but the WiFi credentials will be updated.
24+
25+
You can duplicate the "network" section to add additional WiFi networks (for example your work, and your home).
26+
27+
The "priority" attribute is optional and can be used to prioritize networks if multiple networks are configured (higher numbers are prioritized).
28+
29+
```bash {class="line-numbers linkable-line-numbers"}
30+
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
31+
update_config=1
32+
country=us
33+
34+
network={
35+
ssid="Name of your wireless LAN"
36+
psk="Password for your wireless LAN"
37+
priority=10
38+
}
39+
40+
network={
41+
ssid="Name of your other wireless LAN"
42+
psk="Password for your other wireless LAN"
43+
priority=20
44+
}
45+
```

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ If the computer does not already have a Viam-compatible operating system install
9292
You _do not_ need to follow the "Install `viam-server`" section; you will do that in the next step!
9393

9494
Enable serial communication so that the SBC can communicate with the air quality sensor.
95-
For example, if you are using a Raspberry Pi, SSH to it and [enable serial communication in `raspi-config`](/operate/reference/prepare/rpi-setup/#enable-communication-protocols).
95+
For example, if you are using a Raspberry Pi, SSH to it and enable serial communication using `sudo raspi-config`.
9696

9797
{{% /tablestep %}}
9898
{{% tablestep %}}

docs/tutorials/custom/custom-base-dog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ If the name of the directory where you store and run your code is different, be
113113
pip install viam-sdk
114114
```
115115

116-
1. Enable I<sup>2</sup>C per [the instructions in the Raspberry Pi Setup Guide](/operate/reference/prepare/rpi-setup/#enable-communication-protocols).
116+
1. Enable I<sup>2</sup>C on your Pi using `sudo raspi-config`.
117117

118118
1. Alter the I<sup>2</sup>C baud rate according to [Chapter 1, Step 2 in the Freenove instructions](https://github.com/Freenove/Freenove_Robot_Dog_Kit_for_Raspberry_Pi/blob/master/Tutorial.pdf) (page 40 as of January 24, 2023).
119119

0 commit comments

Comments
 (0)