樹莓派用於裁線
出自TSK WIKI
跳至導覽
跳至搜尋
安裝樹派
- 下載Raspbian Buster Lite
- 下載克隆軟體balenaEtcher
- Raspberry Pi設定
- 預設帳密 帳號: pi 密碼: raspberry
- 設定指令sudo raspi-config
- 變更密碼->1 Change User PW->
- 設定時區I2->Change Timezone->Asia->Taipei
- 設定WIFI國別->I4 Change Wi-fi Country->TW Taiwan
- 設定WIFI帳密->2 Network Options->N2 Wi-fi->輸入WIFI的SSID->輸入WIFI密碼
- 設定鍵盤 Layout->4 Localisation Options->I3 Change Keyboard Layout->Generic 104-Key PC->US->English (US)->No AltGr Key->Left Logo Key
- 啟動SSH->5 Interfacing Options->P2 SSH->YES
- 設定auto login->Boot options
- 查詢ip->ip a
- 切換python 2.7->3.7
- sudo ln -f -s /usr/bin/python3.7 /usr/bin/python
- 安裝pip
- sudo apt-get install python3-pip
- 安裝distutils
- sudo apt-get install python3-distutils
- sudo apt-get install python3-dev
- 安裝pyserial
- sudo pip3 install pyserial
- 修改/boot/cmdline.txt
- dwc_otg.lpm_enable=0 console=ttyAMA0,9600 kgdboc=ttyAMA0,9600 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
- 樹莓派串口通信開發環境
- pip3 install RPi.GPIO
- 安裝git
- sudo apt-get update
- sudo apt-get install git
- nRF24L01模組
- Wireless Pi to Pi Python Communication with NRF24L01+
- sudo raspi-config
- 5.Interfacing options->P4 SPI Enable->restart
- On my Pi in python I use that : pipes = [0xF0F0F0F0E1, 0xF0F0F0F0D2] && And On my Arduino Nano : const uint64_t addresses[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
- nRF24L01模組2 py-nrf24
- pip3 install nrf24
- https://github.com/bjarne-hansen/py-nrf24
- nRF24L01模組3 Syrex-o/lib_nrf24
- enable SPI in raspi-config
- wget https://github.com/Gadgetoid/py-spidev/archive/master.zip
- unzip master.zip
- rm master.zip
- cd ./py-spidev-master
- sudo python3 setup.py install
- mkdir /home/pi/NRF24L01
- cd /home/pi/NRF24L01
- git clone https://github.com/Syrex-o/lib_nrf24
- cd ./lib_nrf24/
- cp lib_nrf24.py /home/pi/NRF24L01/
- sudo apt-get install python3-rpi.gpio -y
Pi4
- hdmi無法顯示時
- hdmi_drive=2
- hdmi_group=2
- hdimi_mode=42