常用

apt源 #

修改/etc/apt/sources.list,去掉自带的源,添加如下源(二选一即可):

清华源 deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ buster main contrib non-free rpi

阿里源 deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main non-free contrib

修改:/etc/apt/sources.list.d/raspi.list,去掉自带的源,添加如下源:

deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui deb-src http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ buster main ui

使用代理

apt update  -o Acquire::http::proxy="socks5h://192.168.31.181:10808/"

raspberry-qt #

https://github.com/tranter/raspberry-pi-qt-builds/releases

cd /
sudo tar xf /home/pi/Qt5.10.1-RaspberryPi3-bin-full.tgz
qtchooser -install  qt-5.12.2 /usr/local/Qt-5.15.2/bin/qmake

https://blog.csdn.net/tianfour/article/details/76068656

youtube-dl #

channel_url="https://www.youtube.com/user/channelname/playlists"
https://www.youtube.com/channel/UCNT5WLWYnSV30mlKLnPzHTg/playlists
https://www.youtube.com/watch?v=Tu-vU4zFre0&list=PLoZQ0sz6CBHGG1qoq-tISRs9tKCLwCyM
https://www.youtube.com/user/numberblocks/playlists
https://www.youtube.com/watch?v=2mQ0JtlddLI&list=PL9swKX1PviEor1JJ9oiJwidaT-q69tYW2

youtube-dl --yes-playlist -f best -ciw -o "${outdir}/%(uploader)s/playlists/%(playlist)s/videos/%(playlist_index)s - %(title)s.%(ext)s" -v $channel_url

-c, --continue                       Force resume of partially downloaded files. By default, youtube-dl will resume downloads if possible.
-i, --ignore-errors                  Continue on download errors, for example to skip unavailable videos in a playlist
-w, --no-overwrites                  Do not overwrite files
#!/bin/bash
url="https://www.youtube.com/playlist?list="$1
channel_url="https://www.youtube.com/user/channelname/playlists"
proxy="--proxy socks5://localhost:1081"
#args="--no-check-certificate --restrict-filenames --no-warnings --ignore-errors"
args="--no-check-certificate --no-warnings --ignore-errors  --continue --no-overwrites "
get_info=" --get-id --get-filename --get-title"
get_sub="--write-auto-sub --skip-download"

list_dir=$2
name=${list_dir##*/}
echo name
list_path=$2"/$name.txt"
if [ ! -d $list_dir ]; then
  mkdir $list_dir
fi
echo $list_dir
echo $list_path
cd $list_dir
youtube-dl $url $args $proxy -o "%(uploader)s/playlists/%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"
#youtube-dl $url $args $proxy -o "${outdir}/%(uploader)s/playlists/%(playlist)s/videos/%(playlist_index)s - %(title)s.%(ext)s"
#youtube-dl $url $args $proxy -o "%(playlist_index)s-%(title)s.%(ext)s"

开启wifi #

pi@raspberrypi:~ $ sudo rfkill list all
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: yes
	Hard blocked: no
pi@raspberrypi:~ $ sudo rfkill unblock 0 

升级固件 #

#安装CA证书
sudo apt-get install ca-certificates

#同步时间
sudo apt-get install ntpdate
sudo ntpdate -u ntp.ubuntu.com


mkdir /root/.rpi-firmware
cd /root/.rpi-firmware
curl -L https://github.com/Hexxeh/rpi-firmware/archive/master.tar.gz -o master.tar.gz
tar -xvzf master.tar.gz
rm master.tar.gz

# 执行本地更新
UPDATE_SELF=0 SKIP_DOWNLOAD=1 rpi-update

# 重启
reboot

How to get back to safety #

If you have done an rpi-update and things are not working as you wish, if your Raspberry Pi is still bootable you can return to the stable release using:

sudo apt-get update
sudo apt install --reinstall libraspberrypi0 libraspberrypi-{bin,dev,doc} raspberrypi-bootloader raspberrypi-kernel

https://www.raspberrypi.org/documentation/

https://wiki.debian.org/DontBreakDebian#Don.27t_make_a_FrankenDebian

安装armhf ubuntu #

https://wiki.ubuntu.com/ARM/RaspberryPi

raspberry 启动流程 #

https://www.lions-wing.net/maker/raspberry-1/boot.html

传感器 #

MPU6050 #

https://openest.io/en/2020/01/21/mpu6050-accelerometer-on-raspberry-pi/

https://tutorials-raspberrypi.com/measuring-rotation-and-acceleration-raspberry-pi/

https://howtomechatronics.com/tutorials/arduino/arduino-and-mpu6050-accelerometer-and-gyroscope-tutorial/

https://www.stupid-projects.com/controlling-a-3d-object-in-unity3d-with-teensy-and-mpu-6050/ #

https://bitbucket.org/dimtass/teensy-hid-with-unity3d/src/master/ #

https://github.com/jrowberg/i2cdevlib/blob/master/RaspberryPi_bcm2835/MPU6050/examples/IMU_zero.cpp

http://brettbeauregard.com/blog/2011/04/improving-the-beginner%e2%80%99s-pid-sample-time/

#

字母名称 国际音标
俯仰角θ(pitch) Θ theta /‘θi:tə/
偏航角ψ(yaw) Ψ psi /psaɪ/
滚转角Φ(roll) φ phi /faɪ/

这里写图片描述

ESP8266 #

https://blog.csdn.net/chentuo2000/article/details/105296166/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-1&spm=1001.2101.3001.4242