--- tags: HACK a nice day --- # Raspberry Pi Documentation 導讀 * 文件: https://www.raspberrypi.org/documentation/ * 活動: https://fb.me/e/29QwTGdJC * 社團: https://www.facebook.com/groups/hackanicedays ## Setup / Quickstart * SD card * 8GB class 4 or class 10 * NOOBS * Raspberry Pi OS * HDMI cable * Keyboard and mouse * raspi-config * Power supply * USB Micro [models pre 4B] * USB Type-C [model 4B] * 3A at 5V for the Model 4B * 2A at 5V for the Model 3B and 3B+ * 700mA at 5V for the earlier ### SD cards * SD card size (capacity) * with desktop and recommended software (Full) * via NOOBS the minimum card size is 16GB * the minimum card size is 8GB * Lite image installations * the minimum card size is 4GB * [>64GB card](https://www.raspberrypi.org/documentation/installation/sdxc_formatting.md) * SD card class * class 4 card will be able to write at 4MB/s * class 10 should be able to attain 10 MB/s * often this write speed is achieved at the cost of read speed and increased seek times (透過犧牲讀取速度來增加搜尋速度來達到這種寫入速度) * Troubleshooting * to save money, USB cables have as little copper in them as possible, and as much as 1V (or 1W) can be lost over the length of the cable * 關機指令 `sudo halt` 選擇 * class 4/10 32GB SD card * 5V 3A power cube * type-C/ micro USB cable ## Installation * 安裝需要的事情 * format SD card * {OS image} == 寫入工具 ==> {SD card} * Raspberry Pi Imager * 省去 `取得 {OS image}` 的動作 * NOOBS (New Out Of Box Software) * 省去 `{OS image} == 寫入工具 ==> {SD card}` 所有過程 * Format an SD card as FAT * at least 16GB for Full Raspberry Pi OS * How to format an SD card as FAT * SD Memory Card Formatter ## Usage Guide * Sonic Pi * Terminal * GPIO * Kodi (XBMC) ## Configuration * raspi-config * `sudo raspi-config` * Advanced Options * Expand Filesystem * NOOBS (expanded automatically) * By default, the size of the Raspbian (舊系統) root file system is 2GB * Interfacing Options * SSH * Localisation Options * Time Zone * Keyboard * WLAN Country * config.txt * This is read by the GPU before the ARM CPU and Linux are initialised. * TCP/IP networking * dhcp * static ip * Wireless connectivity (pi 連 AP) * Command line * Headless setup * Wireless access point (pi 自己當 AP) * UART configuration * Firmware warning icons * LED warning flash codes * Securing your Raspberry Pi * password * SSH * The boot folder * ssh or ssh.txt * wpa_supplicant.conf ## Remote Access * VNC * SSH * SCP * Samba/CIFS Samba 安裝 & 設定 ``` $ sudo apt install samba samba-common-bin ``` 修改 /etc/samba/smb.conf ``` usershare allow guests = no [pi] path = /home/pi guest ok = no read only = no writable = yes ``` ``` $ sudo pdbedit -a -u pi $ sudo systemctl restart smbd.service ``` ## Linux (真正要學習的地方) * Filesystem * Home * Whole File system * Usage * Commands * Text editors * Root * Scripting * Cron / Crontab * .bashrc and .bash_aliases * systemd * rc.local * Software * APT ## Raspberry Pi OS * OMXPlayer ## Hardware * Raspberry Pi * Industrial use * Raspberry Pi Pico ~ END ~