This is an old revision of the document!
Raspberry pi 4B
Raspberry Pi4 ModelB 4GB ラズベリーパイ4 ベーシックセット 技適対応品(Pi4本体・クリアケース・5V/3A電源アダプタ・ヒートシンク)
8,910円
microSDXC 64GB SanDisk サンディスク Extreme UHS-1 U3 V30 4K Ultra HD A2対応 SDアダプター付
1,880円
SDカードを読み書きできるPCが必要。(外付けのSDカードReader/Writerでよい)
RPiをネットワーク接続するためのwifi環境、もしくはEthernetケーブルとハブ(wifiルータのLANポートでよい)。
Follow the official instruction.
https://www.raspberrypi.org/documentation/installation/
⇒Installing images⇒Using other tools
PCにRaspbianイメージを保存
Raspberry Pi Imager for macOS or other⇒Raspbian⇒Raspbian Buster with desktop and recommended software
Download zip ⇒ 2020-02-13-raspbian-buster-full.img (2530MB)
touch /Volumes/boot/sshvi /Volumes/boot/wpa_supplicant.confctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=JP
network={
ssid="abc"
psk="abc"
}
以上のセットアップで起動時にwifi/LANケーブル経由でDHCPでIPを取得できる。
wifi/LAN環境がDHCPであることを確認しておく。また、 RPiを起動する前に現在有効なIPをリストしておく。Macではターミナルから“arp -a”とするか、 wifi routerのセットアップ画面から現在接続されているIPのリストなどの情報から取得する。
ssh pi@…(RPiのIP)…raspberryを使ってlogin
https://www.raspberrypi.org/documentation/configuration/raspi-config.md
ssh接続をした状態で、
sudo rasps-config
として、下の項目を設定する。
ssh接続した状態で
apt updateapt upgradeexitでssh接続解除。RPi側ではRealVNCというVNC serverが立ち上がっている状態なので、Mac/Widnowsで、RealVNCに対応したVNC clientをインストールする必要がある。MacのFinder⇒移動⇒サーバへ接続ではできなかった(他のVNC serverをインストールすればよいのだが今回はRealVNCでいこう)
sudo apt install ibus-mozc #再起動->GUI menu->preference->IBus Preferences->Input methods->Add->Japanese->Japanese-Mozc sudo apt install emacs sudo apt install w3m w3m-img sudo apt install apcalc
vcgencmd measure_tempでCPU温度を取得できる。