Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
|
||
# Using the SPI Protocol | ||
|
||
|
||
|
||
- Display using the e-ink screen? | ||
- Writing to an SD card? | ||
|
||
Sensors | ||
|
||
- RFID | ||
- ADXL345 3-axis accelerometer tilt sensor (also I2C) | ||
- **ADXL345 3-axis accelerometer tilt sensor (also I2C)** (~£5) | ||
- BMP280 temperature/humidity (also I2C) | ||
- CD74HC4067 CMOS 16 Channel Digital Analog Multiplexer | ||
|
||
## References | ||
|
||
- [IAdding a secondary sd card on Raspberry PI](https://ralimtek.com/raspberry%20pi/electronics/software/raspberry_pi_secondary_sd_card/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
# Using Docker | ||
|
||
## 1 Installing Docker | ||
|
||
The first step is to install docker on the Raspberry Pi. It is assumed you have already set up your Raspberry Pi using the instructions in the **Getting Started** worksheet. | ||
|
||
The simplest way to install Docker is to use the apt package manager. We search for the software we want, check the details and then install: | ||
|
||
```shell | ||
$ sudo apt update | ||
Fetched 13.0 MB in 1min 8s (191 kB/s) | ||
Reading package lists... Done | ||
Building dependency tree | ||
Reading state information... Done | ||
$ apt cache search docker | ||
docker - transitional package | ||
docker-compose - Punctual, lightweight development environments using Docker | ||
docker-swarm - Docker\'s native clustering system | ||
docker.io - Linux container runtime | ||
$ apt-cache policy docker.io | ||
docker.io: | ||
Version table: | ||
*** 18.09.1+dfsg1-7.1+rpi1 500 | ||
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages | ||
100 /var/lib/dpkg/status | ||
$ sudo apt install docker.io | ||
$ docker --version | ||
``` | ||
Once the software is installed, lwe should test the setup with the Docker equivalent of "hello world" | ||
|
||
```shell | ||
$ docker run hello-world | ||
Unable to find image 'hello-world:latest' locally | ||
latest: Pulling from library/hello-world | ||
c1eda109e4da: Pull complete | ||
Digest: sha256:6540fc08ee6e6b7b63468dc3317e3303aae178cb8a45ed3123180328bcc1d20f | ||
Status: Downloaded newer image for hello-world:latest | ||
Hello from Docker! | ||
``` | ||
|
||
### 1.1 Test Your Understanding | ||
|
||
You will also need to install: | ||
|
||
1. Docker Compose | ||
2. Docker Swarm | ||
|
||
Use the commands from the installation of the Docker container runtime to find the names of the packages in the repository, check their versions and install. | ||
|
||
## 2 Deploying Containers | ||
|
||
- using existing image as a base | ||
- deploy to the Rpi |