購入したもの
Raspberry Pi2 Model B ボード
(2020年10月現在、入手困難)

Anker® 10W USB急速充電器 ACアダプタ
(2020年10月現在、入手困難)

Transcend microSDHCカード 16GB Class10 UHS-I対応

PLANEX 無線LAN子機 (USBアダプター型) 11n/g/b 150Mbps GW-USNANO2A (FFP)
(2023年02月現在、入手困難)

インストール
Raspberry Pi Imager v1.7.3を使用。
OSはRaspberry Pi OS(32bit)。

OS: RASPBERRY PI OS(32BIT)
ストレージ: OSをインストールするSDRAMを選択
歯車マークをクリック

カスタマイズオプション:いつも使う設定にする

ユーザー名とパスワードを設定する: SSHでログインするユーザー名、パスワード
Wi-Fiを設定する: Wi-FiルーターのSSID、パスワード。
世代は2G
「保存」をクリック。
「書き込む」をクリックして、raspberry Piのディスクを作成する。
Raspberry Piの設定
$ sudo raspi-config

3 Interface Options

必要なオプションを有効にする。
カーソルを動かして、リターンキー。
ここでは、SPIとI2Cを有効化。
5 Localisation Option
L1 Locale: ja_JP.UTF-8 UTF-8
L2 Timezone: Asia/Tokyo
L3 Keyboard: Generic 105-key PC (intl.)
以降の設定でOADG 109Aを設定する。
6 Advanced Options
A1 Expand Filesystem: リターンキーを押して、SDRAM全域を使えるようにする
8 Update
リターンキーを押して、raspi-configを最新に更新する
固定IPアドレス
$ sudo nano /etc/dhcpcd.conf
interface eth0 <-有線
static routers=<ルータIPアドレス>
static domain_name_servers=<ルータIPアドレス>
static ip_address=<固定IPアドレス>
interface wlan0 <-無線
static routers=<ルータIPアドレス>
static domain_name_servers=<ルータIPアドレス>
static ip_address=<固定IPアドレス>
SSH
ターミナルエミュレーターからのログイン。
VS Code Config

Update
$ sudo apt update
$ sudo apt full-upgrade -y
$ sudo apt autoremove -y
$ sudo apt clean
$ sudo reboot
Linux OS バージョン確認
$ uname -a
Linux raspberrypi 5.15.84-v7+ #1613 SMP Thu Jan 5 11:59:48 GMT 2023 armv7l GNU/Linux
40pin ピンヘッダー 信号配置
買ってよかった書籍
2016年07月20日
