---
# System prepended metadata

title: Raspberry Pi

---

# Raspberry Pi

使用時遇到的問題，解決後做紀錄用，或是看到啥很瞎趴的東西做個紀錄

持續學習中，如有錯誤歡迎留言賜教

### 腳位
https://magicjackting.pixnet.net/blog/post/128014810

---

## 5.5inch screen
### 說明
https://www.waveshare.com/wiki/5.5inch_HDMI_AMOLED
### 備註
Option "CalibrationMatrix" "0 1 0 -1 0 1 0 0 1" 後
使用旋轉矩陣將觸控座標旋轉90度，但滑鼠座標在任何狀況下皆沒影響

---

## UI
### Kivy
- install ~Raspbian_with_a_desktop~ : 
1.     sudo apt install python3-setuptools git-core python3-dev

    install python

2.     sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev

    install SDL2
     
3.     python3 -m pip install kivy[base] kivy_examples
       
    This install the minimum dependencies of Kivy. To additionally install Kivy with audio/video support, install either kivy[base,media] or kivy[full]. See Kivy’s dependencies for the list of selectors. 

- example code:
```
from kivy.app import App
from kivy.uix.button import Button

class TestApp(App):
    def build(self):
        return Button(text='Hello World')

TestApp().run()‵
```





### 說明
https://kivy.org/#home
https://pydoing.blogspot.com/2015/06/python-v100-7-python.html
https://buildmedia.readthedocs.org/media/pdf/kivy/latest/kivy.pdf


---

## Cluster Computer
https://atticedu.com/index.php/blog/raspberry-pi-%E6%A8%B9%E8%8E%93%E6%B4%BE/28-%E3%80%90%E6%A8%B9%E8%8E%93%E6%B4%BE%E6%95%99%E5%AD%B8%E3%80%91%E6%89%93%E9%80%A0%E6%A8%B9%E8%8E%93%E6%B4%BE%E5%8F%A2%E9%9B%86%E9%9B%BB%E8%85%A6.html

---

## 樹莓派實驗室
https://ithelp.ithome.com.tw/users/20129392/ironman/3098

---

## dramble rpi
https://www.pidramble.com/

---

## 固定ip
https://medium.com/@chungyi410/%E5%B0%87-raspberry-pi-%E7%9A%84-eth0-%E7%B6%B2%E8%B7%AF%E4%BB%8B%E9%9D%A2%E8%A8%AD%E5%AE%9A%E5%9B%BA%E5%AE%9A-ip-43010aa3effb

### 有線版本
interface eth0
static ip_address=192.168.1.202/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

### 無線版本
interface wlan0
static ip_address=192.168.1.202/24
static routers=192.168.1.1
static domain_name_servers=8.8.8.8

---

## RPI 取消螢幕待機 ( cancel screen blanking )

https://www.raspberrypi.org/documentation/configuration/screensaver.md
https://www.raspberrypi.org/forums/viewtopic.php?t=211855
- 說明
edit /boot/cmdline.txt 
and add
consoleblank=0
right after the rootwait
then reboot

---

## Video options in config.txt

https://www.raspberrypi.org/documentation/configuration/config-txt/video.md

---

## USB to TTl to connect RPi

https://www.raspberrypi.com.tw/1999/connect-to-raspberry-pi-via-serial/

## RPI all Configuration
https://www.raspberrypi.org/documentation/configuration/