Difference between revisions of "Template:E-paper module 1.54 rpi"
From Waveshare Wiki
(Created page with "=Working With Raspberry Pi= ==Hardware Connection== When connecting the Raspberry Pi, you can directly insert the board into the 40PIN pin header of the Raspberry Pi, and pay...") |
m (Text replacement - "https://www.waveshare.com/w/upload/" to "https://files.waveshare.com/upload/") |
||
Line 78: | Line 78: | ||
<pre> | <pre> | ||
sudo apt-get install p7zip-full | sudo apt-get install p7zip-full | ||
− | wget https:// | + | wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z |
7z x E-Paper_code.7z -O./e-Paper | 7z x E-Paper_code.7z -O./e-Paper | ||
cd e-Paper/RaspberryPi_JetsonNano/ | cd e-Paper/RaspberryPi_JetsonNano/ | ||
Line 119: | Line 119: | ||
<pre> | <pre> | ||
sudo apt-get install p7zip-full | sudo apt-get install p7zip-full | ||
− | wget https:// | + | wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z |
7z x E-Paper_code.7z -O./e-Paper | 7z x E-Paper_code.7z -O./e-Paper | ||
cd e-Paper/RaspberryPi_JetsonNano/ | cd e-Paper/RaspberryPi_JetsonNano/ |
Revision as of 06:54, 2 September 2023
Working With Raspberry Pi
Hardware Connection
When connecting the Raspberry Pi, you can directly insert the board into the 40PIN pin header of the Raspberry Pi, and pay attention to the correct pins.
If you choose to connect with an 8PIN cable, please refer to the pin correspondence table below:
e-Paper | Raspberry Pi | |
BCM2835 | Board | |
VCC | 3.3V | 3.3V |
GND | GND | GND |
DIN | MOSI | 19 |
CLK | SCLK | 23 |
CS | CE0 | 24 |
DC | 25 | 22 |
RST | 17 | 11 |
BUSY | 24 | 18 |
Enable SPI Interface
- Open the Raspberry Pi terminal and enter the following command in the config interface:
sudo raspi-config Choose Interfacing Options -> SPI -> Yes Enable SPI interface
Then reboot your Raspberry Pi:
sudo reboot
- Check /boot/config.txt, and you can see 'dtparam=spi=on' was written in.
- To make sure SPI is not occupied, it is recommended to close other drivers' coverage. You can use ls /dev/spi* to check whether SPI is occupied. If the terminal outputs /dev/spidev0.1 and /dev/spidev0.1, SPI is not occupied.
C
- Install BCM2835
#Open the Raspberry Pi terminal and run the following command wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz tar zxvf bcm2835-1.71.tar.gz cd bcm2835-1.71/ sudo ./configure && sudo make && sudo make check && sudo make install # For more information, please refer to the official website: http://www.airspayce.com/mikem/bcm2835/
- Install WiringPi (Optional)
#Open the Raspberry Pi terminal and run the following command: sudo apt-get install wiringpi #For Raspberry Pi systems after May 2019 (earlier than before, you may not need to execute), you may need to upgrade: wget https://project-downloads.drogon.net/wiringpi-latest.deb sudo dpkg -i wiringpi-latest.deb gpio -v #Run gpio -v and version 2.52 will appear. If it does not appear, the installation is wrong. #Bullseye branch system use the following command: git clone https://github.com/WiringPi/WiringPi cd WiringPi ./build gpio -v # Run gpio -v and version 2.60 will appear. If it does not appear, it means that there is an installation error.
- Download the demo via GitHub (You can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
- Download the demo (You can skip this step if you have downloaded it.)
sudo apt-get install p7zip-full wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z 7z x E-Paper_code.7z -O./e-Paper cd e-Paper/RaspberryPi_JetsonNano/
- Compile the demo (Note: -j4 is to compile with 4 threads, the numbers can be modified by yourself; EPD=epd1in54V2 is to specify a macro definition, and epd1in54V2 corresponds to the test demo in the main function).
# Now at e-Paper/RaspberryPi_JetsonNano cd c sudo make clean sudo make -j4 EPD=epd1in54V2
- Run the demo
sudo ./epd
Python
- Install the function library
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 RPi.GPIO sudo pip3 install spidev
- Install function library (python2)
sudo apt-get update sudo apt-get install python-pip sudo apt-get install python-pil sudo apt-get install python-numpy sudo pip install RPi.GPIO sudo pip install spidev
- Download the demo via GitHub (You can skip this step if you have downloaded it.)
git clone https://github.com/waveshare/e-Paper.git cd e-Paper/RaspberryPi_JetsonNano/
- Download the demo (You can skip this step if you have downloaded it.)
sudo apt-get install p7zip-full wget https://files.waveshare.com/upload/3/39/E-Paper_code.7z 7z x E-Paper_code.7z -O./e-Paper cd e-Paper/RaspberryPi_JetsonNano/
- Run the demo
# Make sure it's in e-Paper/RaspberryPi_JetsonNano/ cd python/examples/ python3 epd_1in54_V2_test.py