Pantalla OLED al cap de l'IoT-Vertebrae
La revisió el 11:54, 10 maig 2024 per Jordi Binefa (discussió | contribucions)
A partir de la versió 1.1 del cap de l'IoT-Vertebrae s'ha afegit un connector per a posar una pantalla OLED emprant el bis I2C
Preparació del programari necessari
sudo apt install python3-dev python3-pip python3-numpy libfreetype6-dev libjpeg-dev build-essential sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libportmidi-dev sudo apt install python3-smbus i2c-tools python3-pil python3-setuptools python3-rpi.gpio python3-venv sudo apt install libxml2-dev libxmlsec1-dev sudo apt install -y python3-pil libjpeg-dev zlib1g-dev python3-av sudo apt install -y libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5 -y sudo apt install -y libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff6 -y
git clone https://github.com/rm-hull/luma.examples.git cd luma.examples/
cd .. mkdir oled-screen cd oled-screen/ python3 -m venv venv source venv/bin/activate pip3 install --upgrade pip pip install PEP668 sudo -H pip install -e . pip install --upgrade pip setuptools wheel python -m pip install --upgrade luma.oled
cd ../luma.examples/ cd examples/ python 3d_box.py python crawl.py python -m pip install --upgrade pip sudo -H pip install psutil python -m pip install psutil python sys_info_extended.py python sys_info.py python sys_info_extended.py
Pantalla OLEL com a servei
Arxiu oled_head.service
Feu un arxiu anomenat oled_head.service amb aquest contingut
[Unit] Description=Oled IoT-Vertebrae Head Service Wants=network-online.target After=network-online.target [Service] Type=simple # Restart=always ExecStart=/home/pi/codis/oled-screen/venv/bin/python /home/pi/codis/luma.examples/examples/sys_info_extended.py [Install] WantedBy=multi-user.target