ubuntu (preference)
https://jumptuck.com/blog/2023-02-13-install-linux-orange-pi-3-lts-emmc/
nand-sata-install
sudo nmcli dev wifi connect %yourwifissid% password '%yourwifipass%'
nmcli connection modify %yourwifissid% connection.autoconnect yes
nmcli device set wlan0 autoconnect yes
in /boot/orangepiEnv.txt
overlays=spi-spidev1
param_spidev_spi_bus=1
param_spidev_spi_cs=0
param_spidev_max_freq=100000000
examples with dtc and fdtdump/fdtput (to modify something):
sudo apt install device-tree-compiler
sudo fdtput sun50i-h6-orangepi-3-lts.dtb /soc/spi@5011000 status -t s "okay"
sudo fdtdump sun50i-h6-orangepi-3-lts.dtb
dtc -I dtb -O dts sun50i-h6-orangepi-3-lts.dtb
# create file: /etc/udev/rules.d/50-spi.rules
# with content:
SUBSYSTEM=="spidev", GROUP="spiuser", MODE="0660"
# next:
sudo groupadd spiuser
sudo adduser "$USER" spiuser
sudo apt install ca-certificates curl gnupg lsb-release
# gpg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# repo
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# install
sudo apt update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
sudo apt-get install libpq-dev
sudo apt-get install python3-psycopg2
https://stackoverflow.com/questions/68881500/how-to-send-an-email-using-python
https://fastapi.tiangolo.com/tutorial/background-tasks/ https://testdriven.io/tips/079fd0c1-3a6c-4dd9-a3fe-807e0c6b0935/ https://stackoverflow.com/questions/67599119/fastapi-asynchronous-background-tasks-blocks-other-requests
https://fastapi-users.github.io/fastapi-users/
https://getdatepicker.com/6/functions.html
http://arduino.zl3p.com/infa/pins_nano
https://github.com/vsergeev/python-periphery https://gist.github.com/chrismeyersfsu/3317769 https://forum.arduino.cc/t/spi-slave-mode-example-code/66617
https://github.com/orangepi-xunlong/wiringOP https://micro-pi.ru/%D0%B2%D0%BA%D0%BB%D1%8E%D1%87%D0%B5%D0%BD%D0%B8%D0%B5-%D1%88%D0%B8%D0%BD%D1%8B-spi-%D0%BD%D0%B0-orange-pi/#_SPI__414_Ubuntu_1804
- fastapi_users сделать аутентификацию:
- развернуть postgress бд
- завернуть api в контейнер:
- https://github.com/avishayp/spidev
- hypriot/rpi-kernel#24
docker run --rm -it --cap-add ALL -v /lib/modules:/lib/modules -v /sys:/sys --device /dev/mem:/dev/mem --privileged --entrypoint bash ubuntu:18.04
- фоновый процесс который по расписанию работает
- логгирование информации через телеграм бота
- крутую ui для настройки всяких штук (ага щас)