> For the complete documentation index, see [llms.txt](https://blog.cweihang.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.cweihang.io/note/raspbian.md).

# 树莓派相关

## 踩坑日志

* 树莓派录音，存在多个麦克风时，通过 plughw x:0指定使用哪个麦克风

```
sudo arecord -D "plughw:x,0" -d 5 tmp.wav
```

需要查看麦克风对应的序号，内置的声卡x=0，列表中第一个x=1,第二个x=2，依次类推

```
$pi@raspberry-pi: sudo arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: U0x46d0x825 [USB Device 0x46d:0x825], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
```

* 通过noobs安装raspbian的时候，千万不要联网！不要连wifi也不要插网线，否则会从网上重新下载镜像，超级慢！本来6.3MB/s的事情变成200kB/s
* [树莓派3B+上RTL8188CUS无线网卡启用monitor模式](/note/raspbian/rtlwifi.md)
* 树莓派开启telnet

```
sudo apt-get install telnet
sudo apt-get install telnetd
```

* 树莓派安装opencv

<https://www.pyimagesearch.com/2016/04/18/install-guide-raspberry-pi-3-raspbian-jessie-opencv-3/>

make -j4一步到99%的时候可能会因为树莓派温度过高卡住，各种反应迟钝，可以暂停（断电也行），不要开四线程，直接make，后边的时间不会特别长。

## 树莓派开发实战

> Simon Monk著 人民邮电出版社

### 与ubuntu不同的命令

* rasp-config：各种配置

### Tips

* 当前最新版本：树莓派3B型
* P3 保护壳：防止短路
* P4 电源：推荐1.5A至2A的
* P6 系统：推荐Raspbian
* P6 sd卡放/目录，U盘放home目录
* P7 NOOBS刷系统（FAT32）
* P10 有源USB集线器

## Reference

* <https://www.raspberrypi.org/documentation/>
* <https://www.yuanmas.com/info/DEzk2AdLOY.html>
* <https://segmentfault.com/a/1190000000414341（ffmpeg视频分段）>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://blog.cweihang.io/note/raspbian.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
