Skip to content

Commit 0bc0e83

Browse files
author
Jim Bennett
authored
Updating things (#382)
* Update README.md * Spelling fixes * Update hardware.md * Adding IoT for beginners episode * Adding intro video * Fixing formatting of read more and self study sections. * Adding instructions for installing the ReSpeaker * Adding auth to language understanding * Adding Wio terminal timer setting * Update config.h * Fixing links and images * Increasing version numbers for SD card fix * Adding SD card requirement * speech and translations * Adding more on translations * All Wio Terminal now working except playing audio * Adding more details on virtual environments. * Fixing tracking links * Update app.py * Changing casing for case sensitive OSes * Fix for #322 * Fix for #323 * Adding dev container * Updating setup guides for latest releasesr
1 parent abb219b commit 0bc0e83

File tree

4 files changed

+74
-15
lines changed

4 files changed

+74
-15
lines changed

.devcontainer/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM mcr.microsoft.com/vscode/devcontainers/base:0-bullseye
2+
3+
# [Optional] Uncomment this section to install additional packages.
4+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
5+
# && apt-get -y install --no-install-recommends <your-package-list-here>
6+

.devcontainer/devcontainer.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.236.0/containers/markdown
3+
{
4+
"name": "Markdown Editing",
5+
"dockerFile": "Dockerfile",
6+
7+
// Configure tool-specific properties.
8+
"customizations": {
9+
// Configure properties specific to VS Code.
10+
"vscode": {
11+
// Add the IDs of extensions you want installed when the container is created.
12+
"extensions": [
13+
"docsmsft.docs-authoring-pack"
14+
]
15+
}
16+
},
17+
18+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
19+
// "forwardPorts": [],
20+
21+
// Use 'postCreateCommand' to run commands after the container is created.
22+
// "postCreateCommand": "uname -a",
23+
24+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
25+
"remoteUser": "vscode"
26+
}

1-getting-started/lessons/1-introduction-to-iot/pi.md

+32-15
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ Set up your Pi for development.
3333

3434
1. Follow the instructions in the [Raspberry Pi setup guide](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up) to set up your Pi, connect it to a keyboard/mouse/monitor, connect it to your WiFi or ethernet network, and update the software.
3535

36-
> IMPORTANT
37-
>
38-
> Currently the latest Raspberry Pi OS no longer suports accessing the camera via PiCamera or any other Python library. You can read about this change in this [Raspberry Pi blog post](https://www.raspberrypi.com/news/bullseye-camera-system/).
39-
> You will need to install an older OS by downloading the Buster image from the here:
40-
>
41-
> [https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-05-28/](https://downloads.raspberrypi.org/raspios_armhf/images/raspios_armhf-2021-05-28/)
42-
4336
To program the Pi using the Grove sensors and actuators, you will need to install an editor to allow you to write the device code, and various libraries and tools that interact with the Grove hardware.
4437

4538
1. Once your Pi has rebooted, launch the Terminal by clicking the **Terminal** icon on the top menu bar, or choose *Menu -> Accessories -> Terminal*
@@ -50,16 +43,28 @@ To program the Pi using the Grove sensors and actuators, you will need to instal
5043
sudo apt update && sudo apt full-upgrade --yes
5144
```
5245

53-
1. Run the following command to install all the needed libraries for the Grove hardware:
46+
1. Run the following commands to install all the needed libraries for the Grove hardware:
5447

5548
```sh
56-
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
49+
sudo apt install git python3-dev python3-pip --yes
50+
51+
git clone https://github.com/Seeed-Studio/grove.py
52+
cd grove.py
53+
sudo pip3 install .
54+
55+
sudo raspi-config nonint do_i2c 0
5756
```
5857

59-
One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code. This Grove install script will install the Pip packages you will use to work with the Grove hardware from Python.
58+
This starts by installing Git, along with Pip to install Python packages.
59+
60+
One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code.
61+
62+
The Seeed Grove Python packages need to be installed from source. These commands will clone the repo containing the source code for this package, then install it locally.
6063

6164
> 💁 By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install Pip packages they get installed just to that folder. You won't be using virtual environments when using your Pi. The Grove install script installs the Grove Python packages globally, so to use a virtual environment you would need to set up a virtual environment then manually re-install the Grove packages inside that environment. It's easier to just use global packages, especially as a lot of Pi developers will re-flash a clean SD card for each project.
6265

66+
Finally, this enables the I<sup>2</sup>C interface.
67+
6368
1. Reboot the Pi either using the menu or running the following command in the Terminal:
6469

6570
```sh
@@ -166,16 +171,28 @@ Configure the installed Pi software and install the Grove libraries.
166171
167172
The Pi will be updated and rebooted. The `ssh` session will end when the Pi is rebooted, so leave it for about 30 seconds then reconnect.
168173
169-
1. From the reconnected `ssh` session, run the following command to install all the needed libraries for the Grove hardware:
174+
1. From the reconnected `ssh` session, run the following commands to install all the needed libraries for the Grove hardware:
170175
171176
```sh
172-
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
177+
sudo apt install git python3-dev python3-pip --yes
178+
179+
git clone https://github.com/Seeed-Studio/grove.py
180+
cd grove.py
181+
sudo pip3 install .
182+
183+
sudo raspi-config nonint do_i2c 0
173184
```
174185
175-
One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code. This Grove install script will install the Pip packages you will use to work with the Grove hardware from Python.
186+
This starts by installing Git, along with Pip to install Python packages.
187+
188+
One of the powerful features of Python is the ability to install [Pip packages](https://pypi.org) - these are packages of code written by other people and published to the Internet. You can install a Pip package onto your computer with one command, then use that package in your code.
189+
190+
The Seeed Grove Python packages need to be installed from source. These commands will clone the repo containing the source code for this package, then install it locally.
176191
177192
> 💁 By default when you install a package it is available everywhere on your computer, and this can lead to problems with package versions - such as one application depending on one version of a package that breaks when you install a new version for a different application. To work around this problem, you can use a [Python virtual environment](https://docs.python.org/3/library/venv.html), essentially a copy of Python in a dedicated folder, and when you install Pip packages they get installed just to that folder. You won't be using virtual environments when using your Pi. The Grove install script installs the Grove Python packages globally, so to use a virtual environment you would need to set up a virtual environment then manually re-install the Grove packages inside that environment. It's easier to just use global packages, especially as a lot of Pi developers will re-flash a clean SD card for each project.
178193
194+
Finally, this enables the I<sup>2</sup>C interface.
195+
179196
1. Reboot the Pi by running the following command:
180197
181198
```sh
@@ -239,10 +256,10 @@ Create the Hello World app.
239256
1. From the VS Code Terminal, run the following to run your Python app:
240257
241258
```sh
242-
python3 app.py
259+
python app.py
243260
```
244261
245-
> 💁 You need to explicitly call `python3` to run this code just in case you have Python 2 installed in addition to Python 3 (the latest version). If you have Python2 installed then calling `python` will use Python 2 instead of Python 3
262+
> 💁 You may need to explicitly call `python3` to run this code if you have Python 2 installed in addition to Python 3 (the latest version). If you have Python2 installed then calling `python` will use Python 2 instead of Python 3. By default, the latest Raspberry Pi OS versions only have Python 3 installed.
246263
247264
The following output will appear in the terminal:
248265

1-getting-started/lessons/1-introduction-to-iot/virtual-device.md

+10
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ Configure a Python virtual environment and install the Pip packages for CounterF
7070
.\.venv\Scripts\Activate.ps1
7171
```
7272

73+
> If you get an error about running scripts being disabled on this system, you will need to enable running scripts by setting an appropriate execution policy. You can do this by launching PowerShell as an administrator, then running the following command:
74+
75+
```powershell
76+
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
77+
```
78+
79+
Enter `Y` when asked to confirm. Then re-launch PowerShell and try again.
80+
81+
You can reset this execution policy at a later date if needed. You can read more on this in the [Execution Policies page on Microsoft Docs](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_execution_policies?WT.mc_id=academic-17441-jabenn).
82+
7383
* On macOS or Linux, run:
7484

7585
```cmd

0 commit comments

Comments
 (0)