USB屏幕&编辑器
目前支持 ST7735 128x160 和 ST7789 320x240两种屏幕
GND <=> GND
VCC <=> 3V3
SCL <=> SCLK(GPIO6)
SDA <=> MOSI(GPIO7)
RES <=> RST(GPIO14)
DC <=> DC(GPIO13)
CS <=> GND
BLK <=> 不连接
GND <=> GND
VCC <=> 3V3
SCL <=> PIN6(clk)
SDA <=> PIN7(mosi)
RESET <=> PIN14(rst)
AO <=> PIN13
CS <=> PIN9
BL <=> 5V
GND <=> GND
VCC <=> 3V3
SCL <=> PIN6(clk)
SDA <=> PIN7(mosi)
RESET <=> PIN14(rst)
DC <=> PIN13
CS <=> PIN9
BL <=> 5V
https://github.com/planet0104/rp2040_usb_screen
1、设置default features,启用 v4l-webcam
[features]
default = ["v4l-webcam", "usb-serial"]
2、启动 DockerDesktop
3、进入 wsl2 Ubuntu
4、安装 cross
cargo install cross --git https://github.com/cross-rs/cross
5、编译
注意 Cross.toml 中的配置
# rustup component add rust-src --toolchain nightly
RUSTFLAGS="-Zlocation-detail=none" cross +nightly build -Z build-std=std,panic_abort \
-Z build-std-features=panic_immediate_abort \
-Z build-std-features="optimize_for_size" \
--target aarch64-unknown-linux-gnu --release
设置 deault features
[features]
default = ["editor", "tray", "nokhwa-webcam"]
./run.cmd
设置 deault features
[features]
default = ["editor", "v4l-webcam"]
# export https_proxy=http://192.168.1.25:6003;export http_proxy=http://192.168.1.25:6003;export all_proxy=socks5://192.168.1.25:6003
# export https_proxy=;export http_proxy=;export all_proxy=;
sudo apt-get install -y libclang-dev libv4l-dev libudev-dev
sh run.sh
# sudo ./target/debug/USB-Screen
# sudo ./target/debug/USB-Screen editor
## v4l utils
## sudo apt install v4l-utils
## v4l2-ctl --list-formats -d /dev/video0
## v4l2-ctl --list-formats-ext -d /dev/video0