1,330 bytes added,
12 March {{GD Template Impl}}
==Overview==
==Features==
==Packing List==
==User Manual==
Enable SPI interface
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes to enable SPI interface
Install lgpio liberery
PS: If you use the bookworm system, you can only use lgpio library, bcm2835 and wiringPi can't be installed and used
<pre>
#Open the Raspberry Pi terminal and run the following command
wget https://github.com/joan2937/lg/archive/master.zip
unzip master.zip
cd lg-master
sudo make install
# You can refer to the official website for more: https://github.com/gpiozero/lg
</pre>
Install Python
<pre>
sudo apt-get update
sudo apt-get install python3-pip
sudo apt-get install python3-pil
sudo apt-get install python3-numpy
sudo pip3 install spidev
</pre>
Download Examples
Open the Raspberry Pi terminal and run the following command:
<pre>
sudo apt-get install p7zip-full -y
wget https://sourceforge.net/projects/u-geek/files/HATs//Raspi_M2_HAT/Raspi_M2_HAT_code.7z
7z x Raspi_M2_HAT_code.7z -r -o./Raspi_M2_HAT_code
sudo chmod 777 -R Raspi_M2_HAT_code
cd Raspi_M2_HAT_code
</pre>
Run the demo:
sudo python stats.py
<!--Add review function! -->
<comments />
<!--Please choose the -->
<!--Remove other categories, just keep the appropriate categories -->
[[Category:Product Manual]]
[[Category:Raspberry pi]]