Open main menu

Changes

Q100

1,233 bytes added, 14 March
Reter to [[NVMe SSD boot with the Raspberry Pi 5]]
===LCD display tutorial===
'''1. Enable SPI interface'''
Reter to [[How to enable SPI]]
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes to enable SPI interface
'''2. Install Library''' PS: If you use the bookworm system, you can only use lgpio libererylibrary, bcm2835 and wiringPi can't be installed and used. '''BCM2835'''<PRE>#Open the Raspberry Pi terminal and run the following commandwget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gztar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/sudo ./configure && sudo make && sudo make check && sudo make install# For more, you can refer to the official website at: http://www.airspayce.com/mikem/bcm2835/</PRE>  '''WiringPi'''<pre>#Open the Raspberry Pi terminal and run the following commandcdsudo apt-get install wiringpi#For Raspberry Pi systems after May 2019 (earlier than that can be executed without), an upgrade may be required:wget https://project-downloads.drogon.net/wiringpi-latest.debsudo dpkg -i wiringpi-latest.debgpio -v# Run gpio -v and version 2.52 will appear, if it doesn't it means there was an installation error # Bullseye branch system using the following command:git clone https://github.com/WiringPi/WiringPicd WiringPi. /buildgpio -v# Run gpio -v and version 2.70 will appear, if it doesn't it means there was an installation error</pre> '''lgpio'''<pre>#Open the Raspberry Pi terminal and run the following commandwget https://github.com/joan2937/lg/archive/master.zipunzip master.zipcd lg-mastersudo make install # You can refer to the official website for more: https://github.com/gpiozero/lg</pre>
PS: If you use the bookworm system, you can only use lgpio library, bcm2835 and wiringPi can't be installed and used
</pre>
Install '''Python'''
<pre>
sudo apt-get update
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
#sudo pip3 install spidev
</pre>
'''Download Examples'''<pre>git clone https://github.com/geekworm-com/Q100.gitcd Q100</pre>
Open '''Run the Raspberry Pi terminal and run the following command:demo'''
<pre>
cd pythonsudo apt-get install p7zip-full -ywget https://sourceforge.net/projects/u-geek/files/HATs//Raspi_M2_HAT/Raspi_M2_HAT_codepython status.7z7z x Raspi_M2_HAT_code.7z -r -o./Raspi_M2_HAT_codesudo chmod 777 -R Raspi_M2_HAT_codecd Raspi_M2_HAT_codepy
</pre>
 
Run the demo:
sudo python stats.py
<!--Add review function! -->