Picamera and docker (#398)

* 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

* docker and picaerma additions
pull/399/head
Jim Bennett 2 years ago committed by GitHub
parent a9979e5fff
commit 3874e4640b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,22 +42,30 @@ The camera can be connected to the Raspberry Pi using a ribbon cable.
The Raspberry Pi can now be programmed to use the camera using the [PiCamera](https://pypi.org/project/picamera/) Python library. The Raspberry Pi can now be programmed to use the camera using the [PiCamera](https://pypi.org/project/picamera/) Python library.
### Task - program the camera ### Task - enable legacy camera mode
Program the device. Unfortunately with the release of Raspberry Pi OS Bullseye, the camera software that came with the OS changed, meaning by default PiCamera no longer works. There is a replacement in the works, called PiCamera2, but this is not ready to be used yet.
For now, you can set your Pi into legacy camera mode to allow PiCamera to work. The camera socket is also disabled by default, but turning on the legacy camera software automatically enables the socket.
1. Power up the Pi and wait for it to boot 1. Power up the Pi and wait for it to boot
1. Launch VS Code, either directly on the Pi, or connect via the Remote SSH extension. 1. Launch VS Code, either directly on the Pi, or connect via the Remote SSH extension.
1. By default the camera socket on the Pi is turned off. You can turn it on by running the following commands from your terminal: 1. Run the following commands from your terminal:
```sh ```sh
sudo raspi-config nonint do_camera 0 sudo raspi-config nonint do_legacy 0
sudo reboot sudo reboot
``` ```
This will toggle a setting to enable the camera, then reboot the Pi to make that setting take effect. Wait for the Pi to reboot, then re-launch VS Code. This will toggle a setting to enable the legacy camera software, then reboot the Pi to make that setting take effect.
1. Wait for the Pi to reboot, then re-launch VS Code.
### Task - program the camera
Program the device.
1. From the terminal, create a new folder in the `pi` users home directory called `fruit-quality-detector`. Create a file in this folder called `app.py`. 1. From the terminal, create a new folder in the `pi` users home directory called `fruit-quality-detector`. Create a file in this folder called `app.py`.

@ -208,9 +208,11 @@ The container registry you will use for this lesson is Azure Container Registry.
### Task - install Docker ### Task - install Docker
To build and deploy the classifier classifier, you'll need to install [Docker](https://www.docker.com/). To build and deploy the classifier classifier, you may need to install [Docker](https://www.docker.com/).
1. Follow the Docker installation instructions on the [Docker install page](https://www.docker.com/products/docker-desktop) to install Docker Desktop or the Docker engine. Ensure it is running after installation. You will only need to do this if you plan to build your container from a different device that the one you installed IoT Edge on - as part of installing IoT Edge, Docker is installed for you.
1. If you building the docker container on a different device from your IoT Edge device, follow the Docker installation instructions on the [Docker install page](https://www.docker.com/products/docker-desktop) to install Docker Desktop or the Docker engine. Ensure it is running after installation.
### Task - create a container registry resource ### Task - create a container registry resource
@ -273,7 +275,7 @@ What you downloaded from Custom Vision was a DockerFile containing instructions
Replace `<Container registry name>` with the name you used for your container registry. Replace `<Container registry name>` with the name you used for your container registry.
> 💁 If you are running Linux you nay need to use `sudo` to run this command. > 💁 If you are running on Linux or Raspberry Pi OS you nay need to use `sudo` to run this command.
Docker will build the image, configuring all the software needed. The image will then be tagged as `classifier:v1`. Docker will build the image, configuring all the software needed. The image will then be tagged as `classifier:v1`.

Loading…
Cancel
Save