http://www.ingcool.com/w/api.php?action=feedcontributions&user=INKU-admin123&feedformat=atomingcool - User contributions [en]2024-03-29T00:45:06ZUser contributionsMediaWiki 1.31.7http://www.ingcool.com/w/index.php?title=7IP-CAPLCD&diff=3867IP-CAPLCD2023-01-06T01:52:21Z<p>INKU-admin123: /* 3D Drawing */</p>
<hr />
<div><br />
==Introduction==<br />
7IP-CAPLCD is a universal HDMI display, an IPS screen with 1024x600 resolution. This display has a capacitive touch panel, supports up to 5-points touch. 7DP-CAPLCD supports Raspberry Pi, Jetson nano Developer Kit, can be used as a monitor of desktop PC. <br />
<br />
[[File:7IP-CAPLCD-wiki-1.jpg|700px|alt=7IP-CAPLCD|center|]]<br />
<br />
==Features==<br />
*7inch IPS screen, 1024x600 hardware resolution. support software resolution (up to 1920×1080)<br />
*Supports mini PC like Raspberry Pii, Jetson Nano Developer Kit<br />
*When working with Raspberry Pi, it supports Raspbian / Ubuntu / Kali / Retropie and WIN10 IoT, driver free<br />
*When working with desktop PC, supports Windows 10 / 8.1 / 8 / 7, 5-points touch, driver free<br />
*3.5mm earphone jack supports HDMI audio<br />
*OSD menu for parameters adjustable like brightness, contrast, volume, and so on.<br />
==User Guides==<br />
This display supports mini PC like Raspberry Pi, it can also be used as a monitor of PC. Herein we take Raspberry Pi and Windows PC as examples, show you how to use the display.<br />
===Connect to PC===<br />
The display supports Windows 7/8/8.1/10 when working with Windows PC, supports 5-points and it is driver free.<br />
#Connect the Touch interface of display to USB port of PC by micro USB cable.<br />
#Connect the DISPLAY interface of display to HDMI port of PC by standard HDMI cable.<br />
#*If you require audio, connect your earphone to HO interface, and see the audio output of PC to HDMI<br />
#Wait for displaying,<br />
【'''Notices'''】<br />
*If the screen doesn't display after connecting, please check if you connect all the cables properly, replug them and test it again. Sometimes you may need to restart PC if the PC doesn't support hot-plug.<br />
*The touch panel can only control the main display if multiple screens are connected to PC at the same time. In this case, we recommend you to set the 7IP CAPLCD as the main display.<br />
*The display may flicker because of the low voltage problem of USB port, if you face such a problem, you can connect external 5V power adapter to display.<br />
[[File:7IP-CAPLCD-wiki-2.jpg]]<br />
<br />
===Connect to Raspberry Pi===<br />
The 7IP-CAPLCA supports Raspbian/Ubuntu/Kali/Retropie and WIN 10 IoT. Only single-point touch is supported in most of OS, multiple touches may be supported in some software, max 5-points.<br />
<br />
Raspberry Pi doesn't support hot-plug and auto-recognized the resolution, you need to configure the resolution manually, otherwise, the display cannot work normally.<br />
#Downolad the newest Raspbian image from Raspberry Pi website(Full or Desktop version is recommended )<br />
#Insert the TF card to host PC by card reader and format it.<br />
#*If you have TF card which is ready to use, you can skip to Step 4.<br />
#Write Raspbian (.img file) to TF card by image writer software.<br />
#*Note: you need to unzip the zip file to get the .img file.<br />
#After writing, open the config.txt file which is located in BOOT directory and modify it.<br />
#Remove the line dtoverlay=vc4-fkms-V3D<br />
#Add the following lines to the end of config.txt file then save.<br />
<pre><br />
max_usb_current=1<br />
hdmi_force_hotplug=1 <br />
config_hdmi_boost=10<br />
hdmi_group=2 <br />
hdmi_mode=87 <br />
hdmi_cvt 1024 600 60 6 0 0 0<br />
</pre><br />
<br />
#Insert the TF card to Raspberry Pi<br />
#Connect Touch interface of the display to a USB port of Raspberry Pi<br />
#*The display may flicker because of the low-voltage problem, in this case, you can connect an external power adapter to LCD.<br />
#Connect Display interface to HDMI port of Raspberry Pi<br />
#*If you require audio function, inset earphone to HP interface of LCD and set the audio port to HDMI<br />
#Power on Raspberry Pi and the screen will display.<br />
[[File:7IP-CAPLCD-wiki-3.jpg]]<br />
<br />
===Connect to Jetson Nano Developer Kit===<br />
The display will be auto-recognized by Jetson Nano Developer Kit, it is plug and play. <br />
#Connect Touch interface of LCD to USB port of Jetson Nano by micro USB cable.<br />
#*The display may flicker because of low voltage problem, in this case you can connect an external power adapter to the Power only interface of LCD.<br />
#Connect the Display interface of LCD to HDMI port of Jetson Nano将<br />
#*If you require audio function, you need to insert an earphone to HP port of LCD, then set the audio port to HDMI.<br />
#Power on and wait for displaying.<br />
[[File:7IP-CAPLCD-wiki-4.jpg]]<br />
<br />
==Interface/Key==<br />
[[File:7IP-CAPLCD-wiki-5-en.jpg|800px]]<br />
<br />
==Software==<br />
*[http://www.ingcool.cn/wiki/%E6%96%87%E4%BB%B6:Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager烧]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
==3D Drawing==<br />
*[http://www.ingcool.com/w/images/b/b9/7IP-CAPLCD_3D_Drawing.zip 7IP-CAPLCD 3D Drawing]<br />
<br />
==Related links==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Image for Raspberry Pi]<br />
*[https://developer.nvidia.com/embedded/downloads Jetson Download Center]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7IP-CAPLCD&diff=3857IP-CAPLCD2023-01-06T01:51:39Z<p>INKU-admin123: /* Software */</p>
<hr />
<div><br />
==Introduction==<br />
7IP-CAPLCD is a universal HDMI display, an IPS screen with 1024x600 resolution. This display has a capacitive touch panel, supports up to 5-points touch. 7DP-CAPLCD supports Raspberry Pi, Jetson nano Developer Kit, can be used as a monitor of desktop PC. <br />
<br />
[[File:7IP-CAPLCD-wiki-1.jpg|700px|alt=7IP-CAPLCD|center|]]<br />
<br />
==Features==<br />
*7inch IPS screen, 1024x600 hardware resolution. support software resolution (up to 1920×1080)<br />
*Supports mini PC like Raspberry Pii, Jetson Nano Developer Kit<br />
*When working with Raspberry Pi, it supports Raspbian / Ubuntu / Kali / Retropie and WIN10 IoT, driver free<br />
*When working with desktop PC, supports Windows 10 / 8.1 / 8 / 7, 5-points touch, driver free<br />
*3.5mm earphone jack supports HDMI audio<br />
*OSD menu for parameters adjustable like brightness, contrast, volume, and so on.<br />
==User Guides==<br />
This display supports mini PC like Raspberry Pi, it can also be used as a monitor of PC. Herein we take Raspberry Pi and Windows PC as examples, show you how to use the display.<br />
===Connect to PC===<br />
The display supports Windows 7/8/8.1/10 when working with Windows PC, supports 5-points and it is driver free.<br />
#Connect the Touch interface of display to USB port of PC by micro USB cable.<br />
#Connect the DISPLAY interface of display to HDMI port of PC by standard HDMI cable.<br />
#*If you require audio, connect your earphone to HO interface, and see the audio output of PC to HDMI<br />
#Wait for displaying,<br />
【'''Notices'''】<br />
*If the screen doesn't display after connecting, please check if you connect all the cables properly, replug them and test it again. Sometimes you may need to restart PC if the PC doesn't support hot-plug.<br />
*The touch panel can only control the main display if multiple screens are connected to PC at the same time. In this case, we recommend you to set the 7IP CAPLCD as the main display.<br />
*The display may flicker because of the low voltage problem of USB port, if you face such a problem, you can connect external 5V power adapter to display.<br />
[[File:7IP-CAPLCD-wiki-2.jpg]]<br />
<br />
===Connect to Raspberry Pi===<br />
The 7IP-CAPLCA supports Raspbian/Ubuntu/Kali/Retropie and WIN 10 IoT. Only single-point touch is supported in most of OS, multiple touches may be supported in some software, max 5-points.<br />
<br />
Raspberry Pi doesn't support hot-plug and auto-recognized the resolution, you need to configure the resolution manually, otherwise, the display cannot work normally.<br />
#Downolad the newest Raspbian image from Raspberry Pi website(Full or Desktop version is recommended )<br />
#Insert the TF card to host PC by card reader and format it.<br />
#*If you have TF card which is ready to use, you can skip to Step 4.<br />
#Write Raspbian (.img file) to TF card by image writer software.<br />
#*Note: you need to unzip the zip file to get the .img file.<br />
#After writing, open the config.txt file which is located in BOOT directory and modify it.<br />
#Remove the line dtoverlay=vc4-fkms-V3D<br />
#Add the following lines to the end of config.txt file then save.<br />
<pre><br />
max_usb_current=1<br />
hdmi_force_hotplug=1 <br />
config_hdmi_boost=10<br />
hdmi_group=2 <br />
hdmi_mode=87 <br />
hdmi_cvt 1024 600 60 6 0 0 0<br />
</pre><br />
<br />
#Insert the TF card to Raspberry Pi<br />
#Connect Touch interface of the display to a USB port of Raspberry Pi<br />
#*The display may flicker because of the low-voltage problem, in this case, you can connect an external power adapter to LCD.<br />
#Connect Display interface to HDMI port of Raspberry Pi<br />
#*If you require audio function, inset earphone to HP interface of LCD and set the audio port to HDMI<br />
#Power on Raspberry Pi and the screen will display.<br />
[[File:7IP-CAPLCD-wiki-3.jpg]]<br />
<br />
===Connect to Jetson Nano Developer Kit===<br />
The display will be auto-recognized by Jetson Nano Developer Kit, it is plug and play. <br />
#Connect Touch interface of LCD to USB port of Jetson Nano by micro USB cable.<br />
#*The display may flicker because of low voltage problem, in this case you can connect an external power adapter to the Power only interface of LCD.<br />
#Connect the Display interface of LCD to HDMI port of Jetson Nano将<br />
#*If you require audio function, you need to insert an earphone to HP port of LCD, then set the audio port to HDMI.<br />
#Power on and wait for displaying.<br />
[[File:7IP-CAPLCD-wiki-4.jpg]]<br />
<br />
==Interface/Key==<br />
[[File:7IP-CAPLCD-wiki-5-en.jpg|800px]]<br />
<br />
==Software==<br />
*[http://www.ingcool.cn/wiki/%E6%96%87%E4%BB%B6:Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager烧]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
==3D Drawing==<br />
*[http://www.ingcool.com/w/images/b/b9/7IP-CAPLCD_3D_Drawing.zip 7IP-LCD 3D Drawing]<br />
<br />
==Related links==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Image for Raspberry Pi]<br />
*[https://developer.nvidia.com/embedded/downloads Jetson Download Center]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:7IP-CAPLCD_3D_Drawing.zip&diff=384File:7IP-CAPLCD 3D Drawing.zip2023-01-06T01:50:54Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7DP-CAPLCD&diff=3837DP-CAPLCD2022-09-21T08:25:50Z<p>INKU-admin123: /* Software */</p>
<hr />
<div><br />
==Introduction==<br />
7DP-CAPLCD is a universal HDMI display, an IPS screen with 1024x600 resolution. This display has a capacitive touch panel, supports up to 5-points touch. 7DP-CAPLCD supports Raspberry Pi, can be used as a monitor of desktop PC.<br />
<br />
[[File:7DP-CAPLCD-wiki-1.jpg|700px|alt=7DP-CAPLCD|center|]]<br />
<br />
==Features==<br />
*7inch IPS screen, 1024x600 resolution.<br />
*Supports mini PC like Raspberry Pi.<br />
*When working with Raspberry Pi, it supports Raspbian / Ubuntu / Kali / Retropie and WIN10 IoT, driver free<br />
*When working with desktop PC, supports Windows 10 / 8.1 / 8 / 7, 5-points touch, driver free<br />
<br />
==User Guides==<br />
This display supports a mini PC like Raspberry Pi, it can also be used as a monitor of PC. Herein we take Raspberry Pi and Windows PC as examples, show you how to use the display.<br />
===Connect to PC===<br />
The display supports Windows 7/8/8.1/10 when working with Windows PC, supports 5-points and it is driver-free.<br />
#Turn the Backlight switch on the backside into ON.<br />
#Connect the Touch interface of the display to the USB port of the PC by micro USB cable.<br />
#Connect the DISPLAY interface of the display to the HDMI port of the PC by standard HDMI cable.<br />
#Wait for displaying, <br />
【'''Notices'''】<br />
*If the screen doesn't display after connecting, please check if you connect all the cables properly, replug them and test it again. Sometimes you may need to restart the PC if the PC doesn't support hot-plug.<br />
*The touch panel can only control the main display if multiple screens are connected to the PC at the same time. In this case, we recommend you set the 7DP CAPLCD as the main display.<br />
*The display may flicker because of the low voltage problem of the USB port, if you face such a problem, you can connect an external 5V power adapter to display by special Y-shape USB cable.<br />
[[File:7DP-CAPLCD-wiki-2.jpg]]<br />
<br />
===Connect to Raspberry Pi===<br />
The 7DP-CAPLCA supports Raspbian/Ubuntu/Kali/Retropie and WIN 10 IoT. Only single-point touch is supported in most OS, multiple touches may be supported in some software, max 5-points.<br />
<br />
Raspberry Pi doesn't support hot-plug and auto-recognized resolution, you need to configure the resolution manually, otherwise, the display cannot work normally.<br />
#Downolad the newest Raspbian image from Raspberry Pi website(Full or Desktop version is recommended )<br />
#Insert the TF card to host PC by card reader and format it.<br />
#*If you have TF card which is ready to use, you can skip to Step 4. <br />
#Write Raspbian (.img file) to TF card by image writer software.<br />
#*Note: you need to unzip the zip file to get the .img file.<br />
#After writing, open the config.txt file which is located in BOOT directory, and modify it.<br />
#Remove the line dtoverlay=vc4-fkms-V3D<br />
#Add the following lines to the end of the config.txt file then save.<br />
<pre><br />
max_usb_current=1<br />
hdmi_group=2 <br />
hdmi_mode=87 <br />
hdmi_cvt 1024 600 60 6 0 0 0<br />
hdmi_drive=1<br />
</pre><br />
<br />
#Insert the TF card to Raspberry Pi<br />
#Connect Touch interface of the display to a USB port of Raspberry Pi<br />
#Connect Display interface to HDMI port of Raspberry Pi<br />
#Power on Raspberry Pi and the screen will display.<br />
[[File:7DP-CAPLCD-wiki-3.jpg]]<br />
<br />
==3D Drawing==<br />
*[http://www.ingcool.com/w/images/c/c4/7DP-CAPLCD.zip 3D Drawing]<br />
==Software==<br />
*[http://www.ingcool.cn/wiki/%E6%96%87%E4%BB%B6:Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:7DP-CAPLCD.zip&diff=382File:7DP-CAPLCD.zip2022-09-21T08:25:26Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=5inch_DSI_LCD_(B)&diff=3815inch DSI LCD (B)2022-06-23T12:04:10Z<p>INKU-admin123: /* Features */</p>
<hr />
<div><br />
==Introduction==<br />
The 5inch DSI LCD (B) is a 5inch capacitive touch display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI interface.<br />
<br />
[[File:5inch-DSI-LCD(B)-3.jpg|600px|none]]<br />
<br />
==Features==<br />
*5inch TFT screen. 800x480 hardware resolution<br />
*Capacitive touch panel, support 5-point touch<br />
*Tempered glass capacitive touch panel, hardness up to 6H<br />
*Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another adapter board CM-DSI-ADAPTER is required for CM3/3+/4<br />
*DSI interface, refresh rate up to 60Hz.<br />
*When used with Raspberry Pi, support Raspberry Pi OS / Ubuntu / Kali and Retropie, driver free.<br />
*Supports software control of backlight brightness<br />
<br />
==User Guides==<br />
===Hardware connection===<br />
*Using the FFC cable, connect the 5inch DSI LCD to the DSI port of the Raspberry Pi.<br />
*For easy use, you can fix the Raspberry Pi on the backside of the 5inch DSI LCD with screws<br />
:[[File:4.3inch-DSI-LCD-2.jpg|600px]]<br />
<br />
===Software setting===<br />
Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.<br /><br />
1) Download image from the [https://www.raspberrypi.com/software/operating-systems/ Raspberry Pi website]. <br />
<br />
2) Download the compressed file to the PC, and unzip it to get the .img file.<br />
<br />
3) Connect the TF card to the PC, and use [http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter] software to format the TF card.<br />
<br />
4) Open the [http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.<br />
<br />
5) After the image has finished writing, save, and quit the TF card safely.<br />
<br />
6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.<br />
<br />
【Note】<br />
<br />
*On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.<br />
<br />
*If you are using the Buster branch system, the DSI LCD can work with Raspberry Pi directly after connecting and powering on. But if you are using the Bullseye branch system, you need to modify the config.txt as below:<br />
<br />
Open the config.txt file in the root directory of the TF card(/boot), comment out the following lines:<br />
#camera_auto_detect=1<br />
#dtoverlay=vc4-kms-v3d<br />
Add the following lines under [all]:<br />
dtoverlay=vc4-fkms-v3d<br />
start_x=1 <br />
Then save the file and reboot the system:<br />
sudo reboot<br />
<br />
* If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.<br />
<br />
So in addition to the above modification, you also need to install the Raspicam camera library.<br />
<br />
The installation method is as follows:<br />
cd ~<br />
sudo apt install cmake<br />
git clone https://github.com/raspberrypi/userland<br />
cd userland<br />
./buildme<br />
sudo cp build/bin/* /bin/<br />
<br />
Then execute the following command to shut down the system:<br />
poweroff<br />
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:<br />
<br />
Take a picture:<br />
raspistill -o image.jpg<br />
Take a video:<br />
raspivid -o video.h264 -t 10000<br />
<br />
===Backlight Controlling===<br />
*Open a terminal and type the following command to adjust the brightness.<br /><br />
'''Note:''' If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.<br />
<pre><br />
echo X > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
X can be value in range 0~255. The backlight is darkest if you set it to 0 and the backlight is set to lightest if you set it to 255<br />
<pre><br />
echo 100 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 0 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 255 > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
'''Note:''' If you use the 2021-10-30-raspios-bullseye-armhf image or the laster version, please add the line ''dtoverlay=rpi-backlight'' to the config.txt file and reboot.<br />
<br />
===Disable touch===<br />
At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):<br />
sudo apt-get install matchbox-keyboard<br />
Note: After adding the command, it needs to be restarted to take effect.<br />
==Software==<br />
*[http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7inch_DSI_LCD&diff=3807inch DSI LCD2022-06-23T11:59:09Z<p>INKU-admin123: /* Features */</p>
<hr />
<div><br />
==Introduction==<br />
7inch Capacitive Touch Display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI Interface<br />
<br />
[[File:7inch-DSI-LCD-3.jpg|600px|none]]<br />
<br />
==Features==<br />
*7inch TFT screen. 800x480 hardware resolution<br />
*Capacitive touch panel, support 5-point touch<br />
*Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another adapter board is required for CM3/3+/4<br />
*Driven directly through Raspberry Pi's DSI interface, refresh rate up to 60Hz<br />
*Supports Raspberry Pi OS / Ubuntu / Kali and Retropie.<br />
*Support backlight adjusts by software.<br />
<br />
==User Guides==<br />
===Hardware connection===<br />
1) Connect the DSI interface of 7inch DSI LCD to the DSI interface of Raspberry Pi through a 15PIN FPC cable.<br />
<br />
2) Use the 2PIN power cable to connect the power interface of the LCD to the 40PIN GPIO interface of the Raspberry Pi, as below:<br />
<br />
3) For easy use, you can fix the Raspberry Pi on the backside of the 7inch DSI LCD with screws<br><br />
===Software setting===<br />
Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.<br /><br />
1) Download image from the [https://www.raspberrypi.com/software/operating-systems/ Raspberry Pi website]. <br />
<br />
2) Download the compressed file to the PC, and unzip it to get the .img file.<br />
<br />
3) Connect the TF card to the PC, and use [http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter] software to format the TF card.<br />
<br />
4) Open the [http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.<br />
<br />
5) After the image has finished writing, save, and quit the TF card safely.<br />
<br />
6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.<br />
<br />
【Note】<br />
<br />
*On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.<br />
<br />
*If you are using the Buster branch system, the DSI LCD can work with Raspberry Pi directly after connecting and powering on. But if you are using the Bullseye branch system, you need to modify the config.txt as below:<br />
<br />
Open the config.txt file in the root directory of the TF card(/boot), comment out the following lines:<br />
#camera_auto_detect=1<br />
#dtoverlay=vc4-kms-v3d<br />
Add the following lines under [all]:<br />
dtoverlay=vc4-fkms-v3d<br />
start_x=1 <br />
Then save the file and reboot the system:<br />
sudo reboot<br />
<br />
* If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.<br />
<br />
So in addition to the above modification, you also need to install the Raspicam camera library.<br />
<br />
The installation method is as follows:<br />
cd ~<br />
sudo apt install cmake<br />
git clone https://github.com/raspberrypi/userland<br />
cd userland<br />
./buildme<br />
sudo cp build/bin/* /bin/<br />
<br />
Then execute the following command to shut down the system:<br />
poweroff<br />
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:<br />
<br />
Take a picture:<br />
raspistill -o image.jpg<br />
Take a video:<br />
raspivid -o video.h264 -t 10000<br />
<br />
===Backlight Controlling===<br />
*Open a terminal and type the following command to adjust the brightness.<br /><br />
'''Note:''' If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.<br />
<pre><br />
echo X > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
X can be value in range 0~255. The backlight is darkest if you set it to 0 and the backlight is set to lightest if you set it to 255<br />
<pre><br />
echo 100 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 0 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 255 > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
'''Note:''' If you use the 2021-10-30-raspios-bullseye-armhf image or the laster version, please add the line ''dtoverlay=rpi-backlight'' to the config.txt file and reboot.<br />
<br />
===Disable touch===<br />
At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):<br />
sudo apt-get install matchbox-keyboard<br />
Note: After adding the command, it needs to be restarted to take effect.<br />
==Software==<br />
*[http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7inch_DSI_LCD&diff=3797inch DSI LCD2022-06-23T11:43:55Z<p>INKU-admin123: Created page with " ==Introduction== 7inch Capacitive Touch Display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI Interface none ==Features== *7inch T..."</p>
<hr />
<div><br />
==Introduction==<br />
7inch Capacitive Touch Display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI Interface<br />
<br />
[[File:7inch-DSI-LCD-3.jpg|600px|none]]<br />
<br />
==Features==<br />
*7inch TFT screen. 800x480 hardware resolution<br />
*Capacitive touch panel, support 5-point touch<br />
*Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another [https://www.waveshare.com/cm-dsi-adapter.htm adapter board] is required for CM3/3+/4<br />
*Driven directly through Raspberry Pi's DSI interface, refresh rate up to 60Hz<br />
*Supports Raspberry Pi OS / Ubuntu / Kali and Retropie.<br />
*Support backlight adjusts by software.<br />
<br />
==User Guides==<br />
===Hardware connection===<br />
1) Connect the DSI interface of 7inch DSI LCD to the DSI interface of Raspberry Pi through a 15PIN FPC cable.<br />
<br />
2) Use the 2PIN power cable to connect the power interface of the LCD to the 40PIN GPIO interface of the Raspberry Pi, as below:<br />
<br />
3) For easy use, you can fix the Raspberry Pi on the backside of the 7inch DSI LCD with screws<br><br />
===Software setting===<br />
Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.<br /><br />
1) Download image from the [https://www.raspberrypi.com/software/operating-systems/ Raspberry Pi website]. <br />
<br />
2) Download the compressed file to the PC, and unzip it to get the .img file.<br />
<br />
3) Connect the TF card to the PC, and use [http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter] software to format the TF card.<br />
<br />
4) Open the [http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.<br />
<br />
5) After the image has finished writing, save, and quit the TF card safely.<br />
<br />
6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.<br />
<br />
【Note】<br />
<br />
*On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.<br />
<br />
*If you are using the Buster branch system, the DSI LCD can work with Raspberry Pi directly after connecting and powering on. But if you are using the Bullseye branch system, you need to modify the config.txt as below:<br />
<br />
Open the config.txt file in the root directory of the TF card(/boot), comment out the following lines:<br />
#camera_auto_detect=1<br />
#dtoverlay=vc4-kms-v3d<br />
Add the following lines under [all]:<br />
dtoverlay=vc4-fkms-v3d<br />
start_x=1 <br />
Then save the file and reboot the system:<br />
sudo reboot<br />
<br />
* If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.<br />
<br />
So in addition to the above modification, you also need to install the Raspicam camera library.<br />
<br />
The installation method is as follows:<br />
cd ~<br />
sudo apt install cmake<br />
git clone https://github.com/raspberrypi/userland<br />
cd userland<br />
./buildme<br />
sudo cp build/bin/* /bin/<br />
<br />
Then execute the following command to shut down the system:<br />
poweroff<br />
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:<br />
<br />
Take a picture:<br />
raspistill -o image.jpg<br />
Take a video:<br />
raspivid -o video.h264 -t 10000<br />
<br />
===Backlight Controlling===<br />
*Open a terminal and type the following command to adjust the brightness.<br /><br />
'''Note:''' If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.<br />
<pre><br />
echo X > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
X can be value in range 0~255. The backlight is darkest if you set it to 0 and the backlight is set to lightest if you set it to 255<br />
<pre><br />
echo 100 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 0 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 255 > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
'''Note:''' If you use the 2021-10-30-raspios-bullseye-armhf image or the laster version, please add the line ''dtoverlay=rpi-backlight'' to the config.txt file and reboot.<br />
<br />
===Disable touch===<br />
At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):<br />
sudo apt-get install matchbox-keyboard<br />
Note: After adding the command, it needs to be restarted to take effect.<br />
==Software==<br />
*[http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:7inch-DSI-LCD-3.jpg&diff=378File:7inch-DSI-LCD-3.jpg2022-06-23T11:40:12Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=5inch_DSI_LCD_(B)&diff=3775inch DSI LCD (B)2022-06-23T11:37:21Z<p>INKU-admin123: /* Software */</p>
<hr />
<div><br />
==Introduction==<br />
The 5inch DSI LCD (B) is a 5inch capacitive touch display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI interface.<br />
<br />
[[File:5inch-DSI-LCD(B)-3.jpg|600px|none]]<br />
<br />
==Features==<br />
*5inch TFT screen. 800x480 hardware resolution<br />
*Capacitive touch panel, support 5-point touch<br />
*Tempered glass capacitive touch panel, hardness up to 6H<br />
*Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another adapter board [https://www.waveshare.net/shop/CM-DSI-ADAPTER.htm CM-DSI-ADAPTER]is required for CM3/3+/4<br />
*DSI interface, refresh rate up to 60Hz.<br />
*When used with Raspberry Pi, support Raspberry Pi OS / Ubuntu / Kali and Retropie, driver free.<br />
*Supports software control of backlight brightness<br />
<br />
==User Guides==<br />
===Hardware connection===<br />
*Using the FFC cable, connect the 5inch DSI LCD to the DSI port of the Raspberry Pi.<br />
*For easy use, you can fix the Raspberry Pi on the backside of the 5inch DSI LCD with screws<br />
:[[File:4.3inch-DSI-LCD-2.jpg|600px]]<br />
<br />
===Software setting===<br />
Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.<br /><br />
1) Download image from the [https://www.raspberrypi.com/software/operating-systems/ Raspberry Pi website]. <br />
<br />
2) Download the compressed file to the PC, and unzip it to get the .img file.<br />
<br />
3) Connect the TF card to the PC, and use [http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter] software to format the TF card.<br />
<br />
4) Open the [http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.<br />
<br />
5) After the image has finished writing, save, and quit the TF card safely.<br />
<br />
6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.<br />
<br />
【Note】<br />
<br />
*On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.<br />
<br />
*If you are using the Buster branch system, the DSI LCD can work with Raspberry Pi directly after connecting and powering on. But if you are using the Bullseye branch system, you need to modify the config.txt as below:<br />
<br />
Open the config.txt file in the root directory of the TF card(/boot), comment out the following lines:<br />
#camera_auto_detect=1<br />
#dtoverlay=vc4-kms-v3d<br />
Add the following lines under [all]:<br />
dtoverlay=vc4-fkms-v3d<br />
start_x=1 <br />
Then save the file and reboot the system:<br />
sudo reboot<br />
<br />
* If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.<br />
<br />
So in addition to the above modification, you also need to install the Raspicam camera library.<br />
<br />
The installation method is as follows:<br />
cd ~<br />
sudo apt install cmake<br />
git clone https://github.com/raspberrypi/userland<br />
cd userland<br />
./buildme<br />
sudo cp build/bin/* /bin/<br />
<br />
Then execute the following command to shut down the system:<br />
poweroff<br />
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:<br />
<br />
Take a picture:<br />
raspistill -o image.jpg<br />
Take a video:<br />
raspivid -o video.h264 -t 10000<br />
<br />
===Backlight Controlling===<br />
*Open a terminal and type the following command to adjust the brightness.<br /><br />
'''Note:''' If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.<br />
<pre><br />
echo X > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
X can be value in range 0~255. The backlight is darkest if you set it to 0 and the backlight is set to lightest if you set it to 255<br />
<pre><br />
echo 100 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 0 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 255 > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
'''Note:''' If you use the 2021-10-30-raspios-bullseye-armhf image or the laster version, please add the line ''dtoverlay=rpi-backlight'' to the config.txt file and reboot.<br />
<br />
===Disable touch===<br />
At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):<br />
sudo apt-get install matchbox-keyboard<br />
Note: After adding the command, it needs to be restarted to take effect.<br />
==Software==<br />
*[http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=5inch_DSI_LCD_(B)&diff=3765inch DSI LCD (B)2022-06-23T11:36:56Z<p>INKU-admin123: Created page with " ==Introduction== The 5inch DSI LCD (B) is a 5inch capacitive touch display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI interface. File:5inch-DSI-LCD(B)-3.jpg|600p..."</p>
<hr />
<div><br />
==Introduction==<br />
The 5inch DSI LCD (B) is a 5inch capacitive touch display for Raspberry Pi, 800×480, TFT Wide Angle, MIPI DSI interface.<br />
<br />
[[File:5inch-DSI-LCD(B)-3.jpg|600px|none]]<br />
<br />
==Features==<br />
*5inch TFT screen. 800x480 hardware resolution<br />
*Capacitive touch panel, support 5-point touch<br />
*Tempered glass capacitive touch panel, hardness up to 6H<br />
*Supports Pi 4B/3B+/3A+/3B/2B/B+/A+. Another adapter board [https://www.waveshare.net/shop/CM-DSI-ADAPTER.htm CM-DSI-ADAPTER]is required for CM3/3+/4<br />
*DSI interface, refresh rate up to 60Hz.<br />
*When used with Raspberry Pi, support Raspberry Pi OS / Ubuntu / Kali and Retropie, driver free.<br />
*Supports software control of backlight brightness<br />
<br />
==User Guides==<br />
===Hardware connection===<br />
*Using the FFC cable, connect the 5inch DSI LCD to the DSI port of the Raspberry Pi.<br />
*For easy use, you can fix the Raspberry Pi on the backside of the 5inch DSI LCD with screws<br />
:[[File:4.3inch-DSI-LCD-2.jpg|600px]]<br />
<br />
===Software setting===<br />
Supports Raspberry Pi OS / Ubuntu / Kali and Retropie systems for Raspberry Pi.<br /><br />
1) Download image from the [https://www.raspberrypi.com/software/operating-systems/ Raspberry Pi website]. <br />
<br />
2) Download the compressed file to the PC, and unzip it to get the .img file.<br />
<br />
3) Connect the TF card to the PC, and use [http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter] software to format the TF card.<br />
<br />
4) Open the [http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager] software, select the system image downloaded in step 2, and click ‘Write’ to write the system image.<br />
<br />
5) After the image has finished writing, save, and quit the TF card safely.<br />
<br />
6) Power on the Raspberry Pi and wait for a few seconds until the LCD displays normally. And the touch function can also work after the system starts.<br />
<br />
【Note】<br />
<br />
*On December 2, 2021, the Raspberry Pi OS was divided into two branches, the Buster branch, and the Bullseye branch. The Buster branch is a continuation of the old system and is more stable. The Bullseye branch added some new features, using open source libraries and new interfaces. Since the current Bullseye branch has just been released shortly, it is not stable yet. If you are an industrial user, it is strongly recommended to use the Buster branch.<br />
<br />
*If you are using the Buster branch system, the DSI LCD can work with Raspberry Pi directly after connecting and powering on. But if you are using the Bullseye branch system, you need to modify the config.txt as below:<br />
<br />
Open the config.txt file in the root directory of the TF card(/boot), comment out the following lines:<br />
#camera_auto_detect=1<br />
#dtoverlay=vc4-kms-v3d<br />
Add the following lines under [all]:<br />
dtoverlay=vc4-fkms-v3d<br />
start_x=1 <br />
Then save the file and reboot the system:<br />
sudo reboot<br />
<br />
* If you need to use the CSI camera under the Bullseye branch system. Since this branch uses the libcamera camera library by default, the library doesn't support FKMS drivers.<br />
<br />
So in addition to the above modification, you also need to install the Raspicam camera library.<br />
<br />
The installation method is as follows:<br />
cd ~<br />
sudo apt install cmake<br />
git clone https://github.com/raspberrypi/userland<br />
cd userland<br />
./buildme<br />
sudo cp build/bin/* /bin/<br />
<br />
Then execute the following command to shut down the system:<br />
poweroff<br />
Connect the Raspberry Pi camera to the CSI interface of the Raspberry Pi, power on the Raspberry Pi again, and after the system boots, execute the following command:<br />
<br />
Take a picture:<br />
raspistill -o image.jpg<br />
Take a video:<br />
raspivid -o video.h264 -t 10000<br />
<br />
===Backlight Controlling===<br />
*Open a terminal and type the following command to adjust the brightness.<br /><br />
'''Note:''' If the command reports the 'Permission denied' error, please switch to the 'root' user mode and execute it again.<br />
<pre><br />
echo X > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
X can be value in range 0~255. The backlight is darkest if you set it to 0 and the backlight is set to lightest if you set it to 255<br />
<pre><br />
echo 100 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 0 > /sys/class/backlight/rpi_backlight/brightness<br />
echo 255 > /sys/class/backlight/rpi_backlight/brightness<br />
</pre><br />
'''Note:''' If you use the 2021-10-30-raspios-bullseye-armhf image or the laster version, please add the line ''dtoverlay=rpi-backlight'' to the config.txt file and reboot.<br />
<br />
===Disable touch===<br />
At the end of the config.txt file, add the following commands corresponding to disabling touch (the config file is located in the root directory of the TF card, and can also be accessed through the command: sudo nano /boot/config.txt):<br />
sudo apt-get install matchbox-keyboard<br />
Note: After adding the command, it needs to be restarted to take effect.<br />
==Software==<br />
*[http://www.ingcool.cn/w/images/4/41/Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
*[http://www.ingcool.com/w/images/3/39/Brightness.tar.gz Brightness Script]<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:5inch-DSI-LCD-3.gif&diff=375File:5inch-DSI-LCD-3.gif2022-06-23T11:24:25Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:Brightness.tar.gz&diff=374File:Brightness.tar.gz2022-06-23T11:24:20Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:4.3inch-DSI-LCD-2.jpg&diff=373File:4.3inch-DSI-LCD-2.jpg2022-06-23T11:22:24Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:5inch-DSI-LCD(B)-3.jpg&diff=372File:5inch-DSI-LCD(B)-3.jpg2022-06-23T11:21:25Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Main_Page&diff=371Main Page2022-06-23T11:18:37Z<p>INKU-admin123: /* LCD */</p>
<hr />
<div>__NOTOC__<br />
<div id="display"><br />
='''Displays'''=<br />
=='''LCD'''==<br />
*[[5inch DSI LCD (B)]]<br />
*[[7inch DSI LCD]]<br />
*[[7DP-CAPLCD]]<br />
*[[7IP-CAPLCD]]<br />
<br />
=='''e-Paper'''==<br />
*[[2.13inch e-Paper HAT]]<br />
*[[2.9inch e-Paper Module]]<br />
*[[4.2inch e-Paper Module]]<br />
</div><br />
<div id="Communication"><br />
='''Communication'''=<br />
=='''Wireless Communication'''==<br />
*[[GSM/GPRS/GNSS HAT]]<br />
*[[SIM7600A-H 4G HAT]]<br />
*[[SIM7600E-H 4G HAT]]<br />
=='''Wired Communication'''==<br />
*[[ETH/USB HUB HAT]]<br />
</div><br />
<div id="Camera"><br />
<br />
='''Camera'''=<br />
=='''MIPI-CSI Camera'''==<br />
*[[IMX219-160 Camera]]<br />
</div><br />
='''Others'''=<br />
*[[RPi Relay Board]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Main_Page&diff=370Main Page2022-06-23T11:10:42Z<p>INKU-admin123: /* LCD */</p>
<hr />
<div>__NOTOC__<br />
<div id="display"><br />
='''Displays'''=<br />
=='''LCD'''==<br />
*[[5inch DSI LCD]]<br />
*[[7inch DSI LCD]]<br />
*[[7DP-CAPLCD]]<br />
*[[7IP-CAPLCD]]<br />
<br />
=='''e-Paper'''==<br />
*[[2.13inch e-Paper HAT]]<br />
*[[2.9inch e-Paper Module]]<br />
*[[4.2inch e-Paper Module]]<br />
</div><br />
<div id="Communication"><br />
='''Communication'''=<br />
=='''Wireless Communication'''==<br />
*[[GSM/GPRS/GNSS HAT]]<br />
*[[SIM7600A-H 4G HAT]]<br />
*[[SIM7600E-H 4G HAT]]<br />
=='''Wired Communication'''==<br />
*[[ETH/USB HUB HAT]]<br />
</div><br />
<div id="Camera"><br />
<br />
='''Camera'''=<br />
=='''MIPI-CSI Camera'''==<br />
*[[IMX219-160 Camera]]<br />
</div><br />
='''Others'''=<br />
*[[RPi Relay Board]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7DP-CAPLCD&diff=3697DP-CAPLCD2021-04-28T09:51:27Z<p>INKU-admin123: </p>
<hr />
<div><br />
==Introduction==<br />
7DP-CAPLCD is a universal HDMI display, an IPS screen with 1024x600 resolution. This display has a capacitive touch panel, supports up to 5-points touch. 7DP-CAPLCD supports Raspberry Pi, can be used as a monitor of desktop PC.<br />
<br />
[[File:7DP-CAPLCD-wiki-1.jpg|700px|alt=7DP-CAPLCD|center|]]<br />
<br />
==Features==<br />
*7inch IPS screen, 1024x600 resolution.<br />
*Supports mini PC like Raspberry Pi.<br />
*When working with Raspberry Pi, it supports Raspbian / Ubuntu / Kali / Retropie and WIN10 IoT, driver free<br />
*When working with desktop PC, supports Windows 10 / 8.1 / 8 / 7, 5-points touch, driver free<br />
<br />
==User Guides==<br />
This display supports a mini PC like Raspberry Pi, it can also be used as a monitor of PC. Herein we take Raspberry Pi and Windows PC as examples, show you how to use the display.<br />
===Connect to PC===<br />
The display supports Windows 7/8/8.1/10 when working with Windows PC, supports 5-points and it is driver-free.<br />
#Turn the Backlight switch on the backside into ON.<br />
#Connect the Touch interface of the display to the USB port of the PC by micro USB cable.<br />
#Connect the DISPLAY interface of the display to the HDMI port of the PC by standard HDMI cable.<br />
#Wait for displaying, <br />
【'''Notices'''】<br />
*If the screen doesn't display after connecting, please check if you connect all the cables properly, replug them and test it again. Sometimes you may need to restart the PC if the PC doesn't support hot-plug.<br />
*The touch panel can only control the main display if multiple screens are connected to the PC at the same time. In this case, we recommend you set the 7DP CAPLCD as the main display.<br />
*The display may flicker because of the low voltage problem of the USB port, if you face such a problem, you can connect an external 5V power adapter to display by special Y-shape USB cable.<br />
[[File:7DP-CAPLCD-wiki-2.jpg]]<br />
<br />
===Connect to Raspberry Pi===<br />
The 7DP-CAPLCA supports Raspbian/Ubuntu/Kali/Retropie and WIN 10 IoT. Only single-point touch is supported in most OS, multiple touches may be supported in some software, max 5-points.<br />
<br />
Raspberry Pi doesn't support hot-plug and auto-recognized resolution, you need to configure the resolution manually, otherwise, the display cannot work normally.<br />
#Downolad the newest Raspbian image from Raspberry Pi website(Full or Desktop version is recommended )<br />
#Insert the TF card to host PC by card reader and format it.<br />
#*If you have TF card which is ready to use, you can skip to Step 4. <br />
#Write Raspbian (.img file) to TF card by image writer software.<br />
#*Note: you need to unzip the zip file to get the .img file.<br />
#After writing, open the config.txt file which is located in BOOT directory, and modify it.<br />
#Remove the line dtoverlay=vc4-fkms-V3D<br />
#Add the following lines to the end of the config.txt file then save.<br />
<pre><br />
max_usb_current=1<br />
hdmi_group=2 <br />
hdmi_mode=87 <br />
hdmi_cvt 1024 600 60 6 0 0 0<br />
hdmi_drive=1<br />
</pre><br />
<br />
#Insert the TF card to Raspberry Pi<br />
#Connect Touch interface of the display to a USB port of Raspberry Pi<br />
#Connect Display interface to HDMI port of Raspberry Pi<br />
#Power on Raspberry Pi and the screen will display.<br />
[[File:7DP-CAPLCD-wiki-3.jpg]]<br />
<br />
==Software==<br />
*[http://www.ingcool.cn/wiki/%E6%96%87%E4%BB%B6:Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related link==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Download center of Raspberry Pi image]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=7IP-CAPLCD&diff=3687IP-CAPLCD2021-04-27T11:09:52Z<p>INKU-admin123: /* Interface/Key */</p>
<hr />
<div><br />
==Introduction==<br />
7IP-CAPLCD is a universal HDMI display, an IPS screen with 1024x600 resolution. This display has a capacitive touch panel, supports up to 5-points touch. 7DP-CAPLCD supports Raspberry Pi, Jetson nano Developer Kit, can be used as a monitor of desktop PC. <br />
<br />
[[File:7IP-CAPLCD-wiki-1.jpg|700px|alt=7IP-CAPLCD|center|]]<br />
<br />
==Features==<br />
*7inch IPS screen, 1024x600 hardware resolution. support software resolution (up to 1920×1080)<br />
*Supports mini PC like Raspberry Pii, Jetson Nano Developer Kit<br />
*When working with Raspberry Pi, it supports Raspbian / Ubuntu / Kali / Retropie and WIN10 IoT, driver free<br />
*When working with desktop PC, supports Windows 10 / 8.1 / 8 / 7, 5-points touch, driver free<br />
*3.5mm earphone jack supports HDMI audio<br />
*OSD menu for parameters adjustable like brightness, contrast, volume, and so on.<br />
==User Guides==<br />
This display supports mini PC like Raspberry Pi, it can also be used as a monitor of PC. Herein we take Raspberry Pi and Windows PC as examples, show you how to use the display.<br />
===Connect to PC===<br />
The display supports Windows 7/8/8.1/10 when working with Windows PC, supports 5-points and it is driver free.<br />
#Connect the Touch interface of display to USB port of PC by micro USB cable.<br />
#Connect the DISPLAY interface of display to HDMI port of PC by standard HDMI cable.<br />
#*If you require audio, connect your earphone to HO interface, and see the audio output of PC to HDMI<br />
#Wait for displaying,<br />
【'''Notices'''】<br />
*If the screen doesn't display after connecting, please check if you connect all the cables properly, replug them and test it again. Sometimes you may need to restart PC if the PC doesn't support hot-plug.<br />
*The touch panel can only control the main display if multiple screens are connected to PC at the same time. In this case, we recommend you to set the 7IP CAPLCD as the main display.<br />
*The display may flicker because of the low voltage problem of USB port, if you face such a problem, you can connect external 5V power adapter to display.<br />
[[File:7IP-CAPLCD-wiki-2.jpg]]<br />
<br />
===Connect to Raspberry Pi===<br />
The 7IP-CAPLCA supports Raspbian/Ubuntu/Kali/Retropie and WIN 10 IoT. Only single-point touch is supported in most of OS, multiple touches may be supported in some software, max 5-points.<br />
<br />
Raspberry Pi doesn't support hot-plug and auto-recognized the resolution, you need to configure the resolution manually, otherwise, the display cannot work normally.<br />
#Downolad the newest Raspbian image from Raspberry Pi website(Full or Desktop version is recommended )<br />
#Insert the TF card to host PC by card reader and format it.<br />
#*If you have TF card which is ready to use, you can skip to Step 4.<br />
#Write Raspbian (.img file) to TF card by image writer software.<br />
#*Note: you need to unzip the zip file to get the .img file.<br />
#After writing, open the config.txt file which is located in BOOT directory and modify it.<br />
#Remove the line dtoverlay=vc4-fkms-V3D<br />
#Add the following lines to the end of config.txt file then save.<br />
<pre><br />
max_usb_current=1<br />
hdmi_force_hotplug=1 <br />
config_hdmi_boost=10<br />
hdmi_group=2 <br />
hdmi_mode=87 <br />
hdmi_cvt 1024 600 60 6 0 0 0<br />
</pre><br />
<br />
#Insert the TF card to Raspberry Pi<br />
#Connect Touch interface of the display to a USB port of Raspberry Pi<br />
#*The display may flicker because of the low-voltage problem, in this case, you can connect an external power adapter to LCD.<br />
#Connect Display interface to HDMI port of Raspberry Pi<br />
#*If you require audio function, inset earphone to HP interface of LCD and set the audio port to HDMI<br />
#Power on Raspberry Pi and the screen will display.<br />
[[File:7IP-CAPLCD-wiki-3.jpg]]<br />
<br />
===Connect to Jetson Nano Developer Kit===<br />
The display will be auto-recognized by Jetson Nano Developer Kit, it is plug and play. <br />
#Connect Touch interface of LCD to USB port of Jetson Nano by micro USB cable.<br />
#*The display may flicker because of low voltage problem, in this case you can connect an external power adapter to the Power only interface of LCD.<br />
#Connect the Display interface of LCD to HDMI port of Jetson Nano将<br />
#*If you require audio function, you need to insert an earphone to HP port of LCD, then set the audio port to HDMI.<br />
#Power on and wait for displaying.<br />
[[File:7IP-CAPLCD-wiki-4.jpg]]<br />
<br />
==Interface/Key==<br />
[[File:7IP-CAPLCD-wiki-5-en.jpg|800px]]<br />
<br />
==Software==<br />
*[http://www.ingcool.cn/wiki/%E6%96%87%E4%BB%B6:Panasonic_SDFormatter.7z SDFormatter]<br />
*[http://www.ingcool.cn/w/images/7/76/Win32DiskImager.zip Win32DiskImager烧]<br />
*[http://www.ingcool.cn/w/images/5/56/Putty.zip Putty]<br />
<br />
==Related links==<br />
*[https://www.raspberrypi.org/downloads/raspbian/ Image for Raspberry Pi]<br />
*[https://developer.nvidia.com/embedded/downloads Jetson Download Center]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:7IP-CAPLCD-wiki-5-en.jpg&diff=367File:7IP-CAPLCD-wiki-5-en.jpg2021-04-27T11:09:33Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:E-paper_for_rpi_and_jetsonano_code_description&diff=366Template:E-paper for rpi and jetsonano code description2020-07-29T08:42:53Z<p>INKU-admin123: /* GUI */</p>
<hr />
<div>RaspberryPi and Jetson nano uses the same libraries, as they are compatible with each other in a way.<br /><br />
The codes include bottom hardware interface, middle EPD driver and application;<br /><br />
<br />
==C==<br />
===Bottom hardware interface===<br />
We package the bottom for different hardware platform.<br /><br />
Most of the interfaces are defined in DEV_Config.c(.h) files:RaspberryPi&JetsonNano\c\lib\Config<br /><br />
Two libraries are used for C codes: BCM2835 and WiringPi<br /><br />
By default, we use WiringPI, if you want to change to BCM2835, you can modify RaspberryPi&JetsonNano\c\Makefile file and modify the line 13 and lin 14 as below::<br /><br />
[[file:e-paper_Driver_HAT_RPI_Makefile.png|700px]]<br />
*Data type:<br />
#define UBYTE uint8_t<br />
#define UWORD uint16_t<br />
#define UDOUBLE uint32_t<br />
*Initialize model and exit:<br />
void DEV_Module_Init(void);<br />
void DEV_Module_Exit(void);<br />
Notice:<br />
1. The functions are used to handle GPIO before initializing the e-Paper and after exiting.<br />
2. If the board you have is printed with Rev2.1, the module enters low-ultra mode after DEV_Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
void DEV_Digital_Write(UWORD Pin, UBYTE Value);<br />
UBYTE DEV_Digital_Read(UWORD Pin);<br />
*SPI Write data<br />
void DEV_SPI_WriteByte(UBYTE Value);<br />
<br />
===Middle EPD driver===<br />
The EPD driver are saved in RaspberryPi&JetsonNano\c\lib\e-Paper<br /><br />
Open .h file you can get the functions below<br /><br />
*Initialization: It should be used to initialize e-Paper or wakeup e-Paper from sleep mode.<br />
'''/2.13inch e-Paper、2.9inch e-Paper<br />
void EPD_xxx_Init(UBYTE Mode); // Mode = 0 Initialize full refresh; Mode = 1 Initilize partial refresh <br />
'''//4.2inch e-Paper<br />
void EPD_xxx_Init(void);<br />
xxx is the type of e-paper<br />
<br />
*Clear display: This function is used to clear the e-paper to white<br />
void EPD_xxx_Clear(void); <br />
xxx is the type of e-paper, for example, if the e-paper is 2.13inch e-paper, it should be EPD_2IN13_V2_Clear(); if it is 2.9inch e-paper, it should be EPD_2IN9_Clear()<br /><br />
<br />
*Transmit a frame of image and display<br />
'''//Blac/White e-Paper<br />
void EPD_xxx_Display(UBYTE *Image);<br />
'''//Three colors e-Paper<br />
void EPD_xxx_Display(const UBYTE *blackimage, const UBYTE *ryimage);<br />
<br />
'''// To partial refresh the 2.13inch e-paper, you should firstly use EPD_xxx_DisplayPartBaseImage function to display background, and then partial refresh by function EPD_xxx_DisplayPart()<br />
void EPD_2IN13_V2_DisplayPart(UBYTE *Image);<br />
void EPD_2IN13_V2_DisplayPartBaseImage(UBYTE *Image);<br />
<br />
*Enter sleep mode<br />
void EPD_xxx_Sleep(void);<br />
You should hardware reset or use initialize function to wake up e-Paper from sleep mode<br /><br />
xxx is the type of e-Paper, if it is 2.13, you should use EPD_2IN13_V2_Sleep()<br /><br />
<br />
===Application functions===<br />
Basic drawing functions are provided here. You can find then in: Raspbian Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\GUI\GUI_Paint.c(.h)<br /><br />
<br />
The fonts are saved in the directory: Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\Fonts<br /><br />
<br />
*Create a new image buffer: This function is used to create a new image with width, height, Rotate degree and its color.<br />
<pre><br />
void Paint_NewImage(UBYTE *image, UWORD Width, UWORD Height, UWORD Rotate, UWORD Color)<br />
Parameters:<br />
image: The buffer of the image, this is a pointer of buffer address;<br />
Width: width of the image;<br />
Height: Height of the image;<br />
Rotate: Rotate degree;<br />
Color: Initial color of the image;<br />
</pre><br />
<br />
*Select image buffer: this function is used to select the image buffer. You can create multiple image buffer with last function, then select the buffer for every image.<br />
<pre>void Paint_SelectImage(UBYTE *image)<br />
Parameters:<br />
image: The name of image buffer, it is a pointer of buffer address;<br />
</pre><br />
<br />
*Set display orientation: This function is used to set the rotate degree, it is generally be used after Paint_SelectImage(). You can set the rotate degree to 0、90、180、270 degree.<br />
<pre>void Paint_SetRotate(UWORD Rotate)<br />
Parameters:<br />
Rotate: Rotate degree, you can choose ROTATE_0、ROTATE_90、ROTATE_180、ROTATE_270 which stands for 0、90、180、270 degree repetitively.<br />
</pre><br />
<br />
*Image mirroring: This function is used to mirror image.<br />
<pre>void Paint_SetMirroring(UBYTE mirror)<br />
Parameters:<br />
mirror: You can set it to MIRROR_NONE、MIRROR_HORIZONTAL、MIRROR_VERTICAL、MIRROR_ORIGIN<br />
</pre><br />
et pixel: this function is used to set the position and color of pixels in the buffer. This is the basic function of GUI.<br />
<pre><br />
void Paint_SetPixel(UWORD Xpoint, UWORD Ypoint, UWORD Color)<br />
Parameters:<br />
Xpoint: X-axes in buffer;<br />
Ypoint: Y-axes in buffer;<br />
Color : color<br />
</pre><br />
<br />
*Clear: This function is used to clear the screen to certain color.<br />
<pre><br />
void Paint_Clear(UWORD Color)<br />
Parameters:<br />
Color: <br />
</pre><br />
<br />
*Clear windows:this function is used to clear a window. It is generally used for time display.<br />
<pre><br />
void Paint_ClearWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of the window;<br />
Ystart: Start coordinate of Y-axes of the window;<br />
Xend: End coordinate of X-axes of the window;<br />
Yend: End coordinate of Y-axes of the window;<br />
Color: <br />
</pre><br />
<br />
*Draw point: Draw a point on the position (Xpoint, Ypoint)in buffer<br />
<pre><br />
void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_Style)<br />
Parameters:<br />
Xpoint: X coordinate of point;<br />
Ypoint: Y coordinate of point;<br />
Color: color of point;<br />
Dot_Pixel: the size of point, there are 8 sizes available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Dot_Style: style of point. <br />
typedef enum {<br />
DOT_FILL_AROUND = 1, <br />
DOT_FILL_RIGHTUP,<br />
} DOT_STYLE;<br />
</pre><br />
<br />
*Draw line: draw a line for (Xstart, Ystart) to (Xend, Yend)<br />
<pre><br />
void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, LINE_STYLE Line_Style , LINE_STYLE Line_Style)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of line;<br />
Ystart: Start coordinate of Y-axes of line;<br />
Xend: End coordinate of X-axes of line;<br />
Yend: End coordinate of Y-axes of line;<br />
Color: color of line<br />
Line_width: the width of line, 8 sizes are avalilable;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Line_Style:Style of the line;<br />
typedef enum {<br />
LINE_STYLE_SOLID = 0,<br />
LINE_STYLE_DOTTED,<br />
} LINE_STYLE;<br />
</pre><br />
<br />
*Draw rectangle: Draw a rectangle from (Xstart, Ystart) to (Xend, Yend).<br />
<pre><br />
void Paint_DrawRectangle(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of rectangle<br />
Ystart: Start coordinate of Y-axes of rectangle<br />
Xend: End coordinate of X-end of rectangle<br />
Yend: End coordinate of Y-end of rectangle<br />
Color: color of rectangle<br />
Line_width: The width of edges, 8 sides are available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: set the rectangle full or empty.<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw circle:Draw a circle, use (X_Center Y_Center) as center;<br />
<pre><br />
void Paint_DrawCircle(UWORD X_Center, UWORD Y_Center, UWORD Radius, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
X_Center: X coordinate of center<br />
Y_Center: Y coordinate of center<br />
Radius:Radius of circle<br />
Color: color of circle<br />
Line_width: width of circle, 8 sizes are avalilable<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: style of circle<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw character (ASCII): Set(Xstart Ystart) as letf-top point, draw a ASCII character.<br />
<pre><br />
void Paint_DrawChar(UWORD Xstart, UWORD Ystart, const char Ascii_Char, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
Ascii_Char:Ascii character;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of character;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Draw String: Set point (Xstart Ystart) as the left-top pixel, draw a string.<br />
<pre><br />
void Paint_DrawString_EN(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of characters;<br />
Ystart: Y coordinate of left-top pixel of characters;<br />
pString:Pointer of string<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw Chinese charactgers: this function is used to draw Chinese fonts based ON GB2312 fonts.<br />
<pre><br />
void Paint_DrawString_CN(UWORD Xstart, UWORD Ystart, const char * pString, cFONT* font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: Coordinate of left-top pixel of characters;<br />
Ystart: Coordinate of left-top pixel of characters;<br />
pString:Pointer of string;<br />
Font: GB2312 fonts:<br />
font12CN:11*21(ascii),16*21 (Chinese)<br />
font24CN:24*41(ascii),32*41 (Chinese)<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw number: Draw a string of numbers, (Xstart, Ystart) is the left-top pixel.<br />
<pre><br />
void Paint_DrawNum(UWORD Xpoint, UWORD Ypoint, int32_t Nummber, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel;<br />
Ystart: Y coordicate of left-to pixel;<br />
Nummber: the numbers displayed. the numbers are saved in int format, the maximum is 2147483647;<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of font;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Display time:Display time, (Xstart, Ystart) is the left-top pixel. This function is used for e-Paper which supports partial refresh<br />
<pre><br />
void Paint_DrawTime(UWORD Xstart, UWORD Ystart, PAINT_TIME *pTime, sFONT* Font, UWORD Color_Background, UWORD Color_Foreground)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
pTime:pointer of time displayed;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of fonts<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw image:send image data of bmp file to buffer<br />
<pre><br />
void Paint_DrawBitMap(const unsigned char* image_buffer)<br />
Parameters:<br />
image_buffer: adrress of image data in buffer<br />
</pre><br />
<br />
*Read local bmp picture and write it to buffer<br />
Linux platform like Jetson Nano and Raspberry Pi support to directly operate bmp pictures<br /><br />
Raspberry Pi & Jetson Nano:RaspberryPi&JetsonNano\c\lib\GUI\GUI_BMPfile.c(.h)<br /><br />
<pre><br />
UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)<br />
Parameters:<br />
path:The path of BMP pictures<br />
Xstart: X coordination of left-top of picture, default 0;<br />
Ystart: Y coordination of left-top of picture, default 0;<br />
</pre><br />
<br />
===Testing code===<br />
In the above part, we describe the tree structures of Linux codes, here we talk about the testing code for user.<br /><br />
Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\examples. The codes in examples are testing code, you can modify the definition in main.c file for different types of e-Paper.<br /><br />
<br />
For example, if you want to test 2.13inch e-paper, you need to delete the "//" symbol on line 32.<br /><br />
// EPD_2in13_V2_test();<br />
Change it to<br /><br />
EPD_2in13_V2_test();<br />
Then compile it again and run <br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==Python(Can be used for Jetson Nano\Raspberry Pi)==<br />
It is compatible with python2.7 and python3<br /><br />
python is easy to use than c codes<br /><br />
Raspberry Pi and Jetson Nano:RaspberryPi&JetsonNano\python\lib\<br /><br />
<br />
===epdconfig.py===<br />
*Initialize module and exit handle:<br />
<pre><br />
def module_init()<br />
def module_exit()<br />
</pre><br />
Note:<br />
1.The functions are used to set GPIP before and after driving e-Paper.<br />
2.If the board you have is printed with Rev2.1, module enter low-ultra mode after Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
<pre><br />
def digital_write(pin, value)<br />
def digital_read(pin)<br />
</pre><br />
<br />
*SPI Write data:<br />
<pre><br />
def spi_writebyte(data)<br />
</pre><br />
<br />
===epdxxx.py(xxx is the type of e-Paper)===<br />
*Initailize e-paper: this function should be used at the begining. It can also be used to wake up e-Paper from Sleep mode.<br />
<pre><br />
#For 2.13inch e-Paper、2.9inch e-Paper<br />
def init(self, update) # Choose lut_full_update or lut_partial_update<br />
#Other type<br />
def init(self)<br />
</pre><br />
<br />
*Clear e-paper: This function is used to clear e-Paper to white;<br />
<pre><br />
def Clear(self)<br />
def Clear(self, color) # Some types of e-Paper should use this function to clear screen<br />
</pre><br />
<br />
*Convert image to arrays<br />
<pre><br />
def getbuffer(self, image)<br />
</pre><br />
<br />
*Transmit one frame of image data and display<br />
<pre><br />
#For two-color e-paper<br />
def display(self, image)<br />
<br />
#Because that controllers of 2.13inch e-paper are updated, when partial refresh, they should first use displayPartBaseImage() to display static background, then use displayPart() to dynamaticlly display.<br />
def displayPartBaseImage(self, image)<br />
def displayPart(self, image)<br />
</pre><br />
<br />
*Enter sleep mode<br />
<pre><br />
def sleep(self)<br />
</pre><br />
<br />
===epd_xxx_test.py(xxx is type of e-paper)===<br />
python examples are saved in directory:<br /><br />
Raspberry Pi和Jetson Nano:RaspberryPi&JetsonNano\python\examples\<br /><br />
<br />
If the python installed in your OS is python2, you should run examples like below:<br /><br />
<pre><br />
sudo python epd_2in13_V2_test.py<br />
</pre><br />
If it is python3, the commands should be:<br /><br />
<pre><br />
sudo python3 epd_2in13-V2_test.py<br />
</pre><br />
<br />
===Orientation===<br />
To rotate the display, you can use transpose function like blackimage = blackimage.transpose(Image.ROTATE_270):<br />
<pre><br />
blackimage = blackimage.transpose(Image.ROTATE_270) <br />
redimage = redimage.transpose(Image.ROTATE_270)<br />
#Support ROTATE_90, ROTATE_180, ROTATE_270<br />
</pre><br />
<br />
<br />
===GUI===<br />
Python has a powerful PIL library [http://effbot.org/imagingbook PIL link], which can be used directly to drawing figures. Here we use it for drawing<br /><br />
*Install the library firstly<br />
<pre><br />
sudo apt-get install python3-pil <br />
</pre><br />
<br />
Import the library<br /><br />
<pre><br />
from PIL import Image,ImageDraw,ImageFont<br />
</pre><br />
Image: library; ImageDraw: drawing function; ImageFont: fonts<br /><br />
<br />
*Set image buffer for drawing. <br />
<pre><br />
image = Image.new('1', (epd.width, epd.height), 255) # 255: clear the frame<br />
</pre><br />
The first parameter is the depth of color, 1 means 2 grayscale. The second parameter is a tuple of image size. The third parameter is color of the image, 0 is black and 255 is white.<br /><br />
<br />
*Create an image object.<br />
<pre><br />
draw = ImageDraw.Draw(image)<br />
</pre><br />
<br />
*Draw rectangle<br />
<pre><br />
draw.rectangle((0, 10, 200, 34), fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination. 0, 10 is the top-left point of rectangle, 200, 34) is the right-bottom point. fille = 0 set the filled color to black.<br /><br />
<br />
*Draw line<br />
<pre><br />
draw.line((16, 60, 56, 60), fill = 0)<br />
</pre><br />
The first parameter is a type of coordination, 16, 60 is the begin point, 200, 34 is the end point. fill=0 set the line to black<br /><br />
<br />
*Draw circle<br />
<pre><br />
draw.arc((90, 60, 150, 120), 0, 360, fill = 0)<br />
</pre><br />
This function is used to draw a encircle of a square. The first parameter is a tuple of coordination of the square. the degree of the circle is 0 to 360 °, fille=0 set the circle to black.<br /><br />
If the figure is not square according to the coordination, you will get an ellipse.。<br /><br />
<br />
Besides the arc function, you can also use chord function for drawing solid circle.<br /><br />
<pre><br />
draw.chord((90, 130, 150, 190), 0, 360, fill = 0)<br />
</pre><br />
The first parameter is the coordination of the enclosing rectangle. The second and third parameters are the beginning and end degrees of the circle. The fourth parameter is the fill color of the circle.<br /><br />
<br />
*Character<br />
You can directkt import ImageFont model for drawing characters:<br /><br />
<pre><br />
font = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)<br />
</pre><br />
You can use the fonts of Windows or other fonts which is in ttc format.<br /><br />
<br />
To draw English character, you can directly use the fonts; for Chinese character, you need to add a symbol u:<br /><br />
<pre><br />
draw.text((8, 12), 'hello world', font = font, fill = 255)<br />
draw.text((8, 36), u'电子墨水屏', font = font, fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination of character, the second parameter is the font and las one is set the color.<br /><br />
<br />
*Read local picture<br />
<pre><br />
image = Image.open(os.path.join(picdir, '2in13-v2.bmp'))<br />
</pre><br />
The parameter is the path of picture.<br />
<br />
*Other functions.<br />
For more information about the PIL library, please refer to http://effbot.org/imagingbook.</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:E-paper_for_rpi_and_jetsonano_code_description&diff=365Template:E-paper for rpi and jetsonano code description2020-07-29T08:34:27Z<p>INKU-admin123: /* epd_xxx_test.py(xxx is type of e-paper) */</p>
<hr />
<div>RaspberryPi and Jetson nano uses the same libraries, as they are compatible with each other in a way.<br /><br />
The codes include bottom hardware interface, middle EPD driver and application;<br /><br />
<br />
==C==<br />
===Bottom hardware interface===<br />
We package the bottom for different hardware platform.<br /><br />
Most of the interfaces are defined in DEV_Config.c(.h) files:RaspberryPi&JetsonNano\c\lib\Config<br /><br />
Two libraries are used for C codes: BCM2835 and WiringPi<br /><br />
By default, we use WiringPI, if you want to change to BCM2835, you can modify RaspberryPi&JetsonNano\c\Makefile file and modify the line 13 and lin 14 as below::<br /><br />
[[file:e-paper_Driver_HAT_RPI_Makefile.png|700px]]<br />
*Data type:<br />
#define UBYTE uint8_t<br />
#define UWORD uint16_t<br />
#define UDOUBLE uint32_t<br />
*Initialize model and exit:<br />
void DEV_Module_Init(void);<br />
void DEV_Module_Exit(void);<br />
Notice:<br />
1. The functions are used to handle GPIO before initializing the e-Paper and after exiting.<br />
2. If the board you have is printed with Rev2.1, the module enters low-ultra mode after DEV_Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
void DEV_Digital_Write(UWORD Pin, UBYTE Value);<br />
UBYTE DEV_Digital_Read(UWORD Pin);<br />
*SPI Write data<br />
void DEV_SPI_WriteByte(UBYTE Value);<br />
<br />
===Middle EPD driver===<br />
The EPD driver are saved in RaspberryPi&JetsonNano\c\lib\e-Paper<br /><br />
Open .h file you can get the functions below<br /><br />
*Initialization: It should be used to initialize e-Paper or wakeup e-Paper from sleep mode.<br />
'''/2.13inch e-Paper、2.9inch e-Paper<br />
void EPD_xxx_Init(UBYTE Mode); // Mode = 0 Initialize full refresh; Mode = 1 Initilize partial refresh <br />
'''//4.2inch e-Paper<br />
void EPD_xxx_Init(void);<br />
xxx is the type of e-paper<br />
<br />
*Clear display: This function is used to clear the e-paper to white<br />
void EPD_xxx_Clear(void); <br />
xxx is the type of e-paper, for example, if the e-paper is 2.13inch e-paper, it should be EPD_2IN13_V2_Clear(); if it is 2.9inch e-paper, it should be EPD_2IN9_Clear()<br /><br />
<br />
*Transmit a frame of image and display<br />
'''//Blac/White e-Paper<br />
void EPD_xxx_Display(UBYTE *Image);<br />
'''//Three colors e-Paper<br />
void EPD_xxx_Display(const UBYTE *blackimage, const UBYTE *ryimage);<br />
<br />
'''// To partial refresh the 2.13inch e-paper, you should firstly use EPD_xxx_DisplayPartBaseImage function to display background, and then partial refresh by function EPD_xxx_DisplayPart()<br />
void EPD_2IN13_V2_DisplayPart(UBYTE *Image);<br />
void EPD_2IN13_V2_DisplayPartBaseImage(UBYTE *Image);<br />
<br />
*Enter sleep mode<br />
void EPD_xxx_Sleep(void);<br />
You should hardware reset or use initialize function to wake up e-Paper from sleep mode<br /><br />
xxx is the type of e-Paper, if it is 2.13, you should use EPD_2IN13_V2_Sleep()<br /><br />
<br />
===Application functions===<br />
Basic drawing functions are provided here. You can find then in: Raspbian Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\GUI\GUI_Paint.c(.h)<br /><br />
<br />
The fonts are saved in the directory: Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\Fonts<br /><br />
<br />
*Create a new image buffer: This function is used to create a new image with width, height, Rotate degree and its color.<br />
<pre><br />
void Paint_NewImage(UBYTE *image, UWORD Width, UWORD Height, UWORD Rotate, UWORD Color)<br />
Parameters:<br />
image: The buffer of the image, this is a pointer of buffer address;<br />
Width: width of the image;<br />
Height: Height of the image;<br />
Rotate: Rotate degree;<br />
Color: Initial color of the image;<br />
</pre><br />
<br />
*Select image buffer: this function is used to select the image buffer. You can create multiple image buffer with last function, then select the buffer for every image.<br />
<pre>void Paint_SelectImage(UBYTE *image)<br />
Parameters:<br />
image: The name of image buffer, it is a pointer of buffer address;<br />
</pre><br />
<br />
*Set display orientation: This function is used to set the rotate degree, it is generally be used after Paint_SelectImage(). You can set the rotate degree to 0、90、180、270 degree.<br />
<pre>void Paint_SetRotate(UWORD Rotate)<br />
Parameters:<br />
Rotate: Rotate degree, you can choose ROTATE_0、ROTATE_90、ROTATE_180、ROTATE_270 which stands for 0、90、180、270 degree repetitively.<br />
</pre><br />
<br />
*Image mirroring: This function is used to mirror image.<br />
<pre>void Paint_SetMirroring(UBYTE mirror)<br />
Parameters:<br />
mirror: You can set it to MIRROR_NONE、MIRROR_HORIZONTAL、MIRROR_VERTICAL、MIRROR_ORIGIN<br />
</pre><br />
et pixel: this function is used to set the position and color of pixels in the buffer. This is the basic function of GUI.<br />
<pre><br />
void Paint_SetPixel(UWORD Xpoint, UWORD Ypoint, UWORD Color)<br />
Parameters:<br />
Xpoint: X-axes in buffer;<br />
Ypoint: Y-axes in buffer;<br />
Color : color<br />
</pre><br />
<br />
*Clear: This function is used to clear the screen to certain color.<br />
<pre><br />
void Paint_Clear(UWORD Color)<br />
Parameters:<br />
Color: <br />
</pre><br />
<br />
*Clear windows:this function is used to clear a window. It is generally used for time display.<br />
<pre><br />
void Paint_ClearWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of the window;<br />
Ystart: Start coordinate of Y-axes of the window;<br />
Xend: End coordinate of X-axes of the window;<br />
Yend: End coordinate of Y-axes of the window;<br />
Color: <br />
</pre><br />
<br />
*Draw point: Draw a point on the position (Xpoint, Ypoint)in buffer<br />
<pre><br />
void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_Style)<br />
Parameters:<br />
Xpoint: X coordinate of point;<br />
Ypoint: Y coordinate of point;<br />
Color: color of point;<br />
Dot_Pixel: the size of point, there are 8 sizes available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Dot_Style: style of point. <br />
typedef enum {<br />
DOT_FILL_AROUND = 1, <br />
DOT_FILL_RIGHTUP,<br />
} DOT_STYLE;<br />
</pre><br />
<br />
*Draw line: draw a line for (Xstart, Ystart) to (Xend, Yend)<br />
<pre><br />
void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, LINE_STYLE Line_Style , LINE_STYLE Line_Style)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of line;<br />
Ystart: Start coordinate of Y-axes of line;<br />
Xend: End coordinate of X-axes of line;<br />
Yend: End coordinate of Y-axes of line;<br />
Color: color of line<br />
Line_width: the width of line, 8 sizes are avalilable;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Line_Style:Style of the line;<br />
typedef enum {<br />
LINE_STYLE_SOLID = 0,<br />
LINE_STYLE_DOTTED,<br />
} LINE_STYLE;<br />
</pre><br />
<br />
*Draw rectangle: Draw a rectangle from (Xstart, Ystart) to (Xend, Yend).<br />
<pre><br />
void Paint_DrawRectangle(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of rectangle<br />
Ystart: Start coordinate of Y-axes of rectangle<br />
Xend: End coordinate of X-end of rectangle<br />
Yend: End coordinate of Y-end of rectangle<br />
Color: color of rectangle<br />
Line_width: The width of edges, 8 sides are available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: set the rectangle full or empty.<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw circle:Draw a circle, use (X_Center Y_Center) as center;<br />
<pre><br />
void Paint_DrawCircle(UWORD X_Center, UWORD Y_Center, UWORD Radius, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
X_Center: X coordinate of center<br />
Y_Center: Y coordinate of center<br />
Radius:Radius of circle<br />
Color: color of circle<br />
Line_width: width of circle, 8 sizes are avalilable<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: style of circle<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw character (ASCII): Set(Xstart Ystart) as letf-top point, draw a ASCII character.<br />
<pre><br />
void Paint_DrawChar(UWORD Xstart, UWORD Ystart, const char Ascii_Char, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
Ascii_Char:Ascii character;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of character;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Draw String: Set point (Xstart Ystart) as the left-top pixel, draw a string.<br />
<pre><br />
void Paint_DrawString_EN(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of characters;<br />
Ystart: Y coordinate of left-top pixel of characters;<br />
pString:Pointer of string<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw Chinese charactgers: this function is used to draw Chinese fonts based ON GB2312 fonts.<br />
<pre><br />
void Paint_DrawString_CN(UWORD Xstart, UWORD Ystart, const char * pString, cFONT* font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: Coordinate of left-top pixel of characters;<br />
Ystart: Coordinate of left-top pixel of characters;<br />
pString:Pointer of string;<br />
Font: GB2312 fonts:<br />
font12CN:11*21(ascii),16*21 (Chinese)<br />
font24CN:24*41(ascii),32*41 (Chinese)<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw number: Draw a string of numbers, (Xstart, Ystart) is the left-top pixel.<br />
<pre><br />
void Paint_DrawNum(UWORD Xpoint, UWORD Ypoint, int32_t Nummber, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel;<br />
Ystart: Y coordicate of left-to pixel;<br />
Nummber: the numbers displayed. the numbers are saved in int format, the maximum is 2147483647;<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of font;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Display time:Display time, (Xstart, Ystart) is the left-top pixel. This function is used for e-Paper which supports partial refresh<br />
<pre><br />
void Paint_DrawTime(UWORD Xstart, UWORD Ystart, PAINT_TIME *pTime, sFONT* Font, UWORD Color_Background, UWORD Color_Foreground)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
pTime:pointer of time displayed;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of fonts<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw image:send image data of bmp file to buffer<br />
<pre><br />
void Paint_DrawBitMap(const unsigned char* image_buffer)<br />
Parameters:<br />
image_buffer: adrress of image data in buffer<br />
</pre><br />
<br />
*Read local bmp picture and write it to buffer<br />
Linux platform like Jetson Nano and Raspberry Pi support to directly operate bmp pictures<br /><br />
Raspberry Pi & Jetson Nano:RaspberryPi&JetsonNano\c\lib\GUI\GUI_BMPfile.c(.h)<br /><br />
<pre><br />
UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)<br />
Parameters:<br />
path:The path of BMP pictures<br />
Xstart: X coordination of left-top of picture, default 0;<br />
Ystart: Y coordination of left-top of picture, default 0;<br />
</pre><br />
<br />
===Testing code===<br />
In the above part, we describe the tree structures of Linux codes, here we talk about the testing code for user.<br /><br />
Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\examples. The codes in examples are testing code, you can modify the definition in main.c file for different types of e-Paper.<br /><br />
<br />
For example, if you want to test 2.13inch e-paper, you need to delete the "//" symbol on line 32.<br /><br />
// EPD_2in13_V2_test();<br />
Change it to<br /><br />
EPD_2in13_V2_test();<br />
Then compile it again and run <br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==Python(Can be used for Jetson Nano\Raspberry Pi)==<br />
It is compatible with python2.7 and python3<br /><br />
python is easy to use than c codes<br /><br />
Raspberry Pi and Jetson Nano:RaspberryPi&JetsonNano\python\lib\<br /><br />
<br />
===epdconfig.py===<br />
*Initialize module and exit handle:<br />
<pre><br />
def module_init()<br />
def module_exit()<br />
</pre><br />
Note:<br />
1.The functions are used to set GPIP before and after driving e-Paper.<br />
2.If the board you have is printed with Rev2.1, module enter low-ultra mode after Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
<pre><br />
def digital_write(pin, value)<br />
def digital_read(pin)<br />
</pre><br />
<br />
*SPI Write data:<br />
<pre><br />
def spi_writebyte(data)<br />
</pre><br />
<br />
===epdxxx.py(xxx is the type of e-Paper)===<br />
*Initailize e-paper: this function should be used at the begining. It can also be used to wake up e-Paper from Sleep mode.<br />
<pre><br />
#For 2.13inch e-Paper、2.9inch e-Paper<br />
def init(self, update) # Choose lut_full_update or lut_partial_update<br />
#Other type<br />
def init(self)<br />
</pre><br />
<br />
*Clear e-paper: This function is used to clear e-Paper to white;<br />
<pre><br />
def Clear(self)<br />
def Clear(self, color) # Some types of e-Paper should use this function to clear screen<br />
</pre><br />
<br />
*Convert image to arrays<br />
<pre><br />
def getbuffer(self, image)<br />
</pre><br />
<br />
*Transmit one frame of image data and display<br />
<pre><br />
#For two-color e-paper<br />
def display(self, image)<br />
<br />
#Because that controllers of 2.13inch e-paper are updated, when partial refresh, they should first use displayPartBaseImage() to display static background, then use displayPart() to dynamaticlly display.<br />
def displayPartBaseImage(self, image)<br />
def displayPart(self, image)<br />
</pre><br />
<br />
*Enter sleep mode<br />
<pre><br />
def sleep(self)<br />
</pre><br />
<br />
===epd_xxx_test.py(xxx is type of e-paper)===<br />
python examples are saved in directory:<br /><br />
Raspberry Pi和Jetson Nano:RaspberryPi&JetsonNano\python\examples\<br /><br />
<br />
If the python installed in your OS is python2, you should run examples like below:<br /><br />
<pre><br />
sudo python epd_2in13_V2_test.py<br />
</pre><br />
If it is python3, the commands should be:<br /><br />
<pre><br />
sudo python3 epd_2in13-V2_test.py<br />
</pre><br />
<br />
===Orientation===<br />
To rotate the display, you can use transpose function like blackimage = blackimage.transpose(Image.ROTATE_270):<br />
<pre><br />
blackimage = blackimage.transpose(Image.ROTATE_270) <br />
redimage = redimage.transpose(Image.ROTATE_270)<br />
#Support ROTATE_90, ROTATE_180, ROTATE_270<br />
</pre><br />
<br />
<br />
===GUI===<br />
Python has a powerful PIL library [http://effbot.org/imagingbook PIL link], which can be used directly to drawing figures. Here we use it for drawing<br /><br />
*Install the library firstly<br />
<pre><br />
sudo apt-get install python3-pil <br />
</pre><br />
<br />
Import the library<br /><br />
<pre><br />
from PIL import Image,ImageDraw,ImageFont<br />
</pre><br />
Image: library; ImageDraw: drawing function; ImageFont: fonts<br /><br />
<br />
*Set image buffer for drawing. <br />
<pre><br />
image = Image.new('1', (epd.width, epd.height), 255) # 255: clear the frame<br />
</pre><br />
The first parameter is the depth of color, 1 means 2 grayscale. The second parameter is a tuple of image size. The third parameter is color of the image, 0 is black and 255 is white.<br /><br />
<br />
*Create an image object.<br />
<pre><br />
draw = ImageDraw.Draw(image)<br />
</pre><br />
<br />
*Draw rectangle<br />
<pre><br />
draw.rectangle((0, 10, 200, 34), fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination. 0, 10 is the top-left point of rectangle, 200, 34) is the right-bottom point. fille = 0 set the filled color to black.<br /><br />
<br />
*Draw line<br />
<pre><br />
draw.line((16, 60, 56, 60), fill = 0)<br />
</pre><br />
The first parameter is a type of coordination, 16, 60 is the begin point, 200, 34 is the end point. fill=0 set the line to black<br /><br />
<br />
*Draw circle<br />
<pre><br />
draw.arc((90, 60, 150, 120), 0, 360, fill = 0)<br />
</pre><br />
This function is used to draw a encircle of a square. The first parameter is a tuple of coordination of the square. the degree of the circle is 0 to 360 °, fille=0 set the circle to black.<br /><br />
If the figure is not square according to the coordination, you will get an ellipse.。<br /><br />
<br />
Besides the arc function, you can also use chord function for drawing solid circle.<br /><br />
<pre><br />
draw.chord((90, 130, 150, 190), 0, 360, fill = 0)<br />
</pre><br />
The first parameter is the coordination of the enclosing rectangle. The second and third parameters are the beginning and end degrees of the circle. The fourth parameter is the fill color of the circle.<br /><br />
<br />
*Character<br />
You can directkt import ImageFont model for drawing characters:<br /><br />
<pre><br />
font = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)<br />
</pre><br />
You can use the fonts of Windows or other fonts which is in ttc format.<br /><br />
<br />
To draw English character, you can directly use the fonts; for Chinese character, you need to add a symbol u:<br /><br />
<pre><br />
draw.text((8, 12), 'hello world', font = font, fill = 255)<br />
draw.text((8, 36), u'电子墨水屏', font = font, fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination of character, the second parameter is the font and las one is set the color.<br /><br />
<br />
*Read local picture<br />
<pre><br />
image = Image.open(os.path.join(picdir, '2in13-v2.bmp'))<br />
</pre><br />
The parameter is the path of picture.<br />
<br />
*Other functions.<br />
For more information of the PIL library, please refer to http://effbot.org/imagingbook.</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:E-paper_for_rpi_and_jetsonano_code_description&diff=364Template:E-paper for rpi and jetsonano code description2020-07-29T08:30:11Z<p>INKU-admin123: /* Python(Can be used for Jetson Nano\Raspberry Pi) */</p>
<hr />
<div>RaspberryPi and Jetson nano uses the same libraries, as they are compatible with each other in a way.<br /><br />
The codes include bottom hardware interface, middle EPD driver and application;<br /><br />
<br />
==C==<br />
===Bottom hardware interface===<br />
We package the bottom for different hardware platform.<br /><br />
Most of the interfaces are defined in DEV_Config.c(.h) files:RaspberryPi&JetsonNano\c\lib\Config<br /><br />
Two libraries are used for C codes: BCM2835 and WiringPi<br /><br />
By default, we use WiringPI, if you want to change to BCM2835, you can modify RaspberryPi&JetsonNano\c\Makefile file and modify the line 13 and lin 14 as below::<br /><br />
[[file:e-paper_Driver_HAT_RPI_Makefile.png|700px]]<br />
*Data type:<br />
#define UBYTE uint8_t<br />
#define UWORD uint16_t<br />
#define UDOUBLE uint32_t<br />
*Initialize model and exit:<br />
void DEV_Module_Init(void);<br />
void DEV_Module_Exit(void);<br />
Notice:<br />
1. The functions are used to handle GPIO before initializing the e-Paper and after exiting.<br />
2. If the board you have is printed with Rev2.1, the module enters low-ultra mode after DEV_Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
void DEV_Digital_Write(UWORD Pin, UBYTE Value);<br />
UBYTE DEV_Digital_Read(UWORD Pin);<br />
*SPI Write data<br />
void DEV_SPI_WriteByte(UBYTE Value);<br />
<br />
===Middle EPD driver===<br />
The EPD driver are saved in RaspberryPi&JetsonNano\c\lib\e-Paper<br /><br />
Open .h file you can get the functions below<br /><br />
*Initialization: It should be used to initialize e-Paper or wakeup e-Paper from sleep mode.<br />
'''/2.13inch e-Paper、2.9inch e-Paper<br />
void EPD_xxx_Init(UBYTE Mode); // Mode = 0 Initialize full refresh; Mode = 1 Initilize partial refresh <br />
'''//4.2inch e-Paper<br />
void EPD_xxx_Init(void);<br />
xxx is the type of e-paper<br />
<br />
*Clear display: This function is used to clear the e-paper to white<br />
void EPD_xxx_Clear(void); <br />
xxx is the type of e-paper, for example, if the e-paper is 2.13inch e-paper, it should be EPD_2IN13_V2_Clear(); if it is 2.9inch e-paper, it should be EPD_2IN9_Clear()<br /><br />
<br />
*Transmit a frame of image and display<br />
'''//Blac/White e-Paper<br />
void EPD_xxx_Display(UBYTE *Image);<br />
'''//Three colors e-Paper<br />
void EPD_xxx_Display(const UBYTE *blackimage, const UBYTE *ryimage);<br />
<br />
'''// To partial refresh the 2.13inch e-paper, you should firstly use EPD_xxx_DisplayPartBaseImage function to display background, and then partial refresh by function EPD_xxx_DisplayPart()<br />
void EPD_2IN13_V2_DisplayPart(UBYTE *Image);<br />
void EPD_2IN13_V2_DisplayPartBaseImage(UBYTE *Image);<br />
<br />
*Enter sleep mode<br />
void EPD_xxx_Sleep(void);<br />
You should hardware reset or use initialize function to wake up e-Paper from sleep mode<br /><br />
xxx is the type of e-Paper, if it is 2.13, you should use EPD_2IN13_V2_Sleep()<br /><br />
<br />
===Application functions===<br />
Basic drawing functions are provided here. You can find then in: Raspbian Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\GUI\GUI_Paint.c(.h)<br /><br />
<br />
The fonts are saved in the directory: Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\Fonts<br /><br />
<br />
*Create a new image buffer: This function is used to create a new image with width, height, Rotate degree and its color.<br />
<pre><br />
void Paint_NewImage(UBYTE *image, UWORD Width, UWORD Height, UWORD Rotate, UWORD Color)<br />
Parameters:<br />
image: The buffer of the image, this is a pointer of buffer address;<br />
Width: width of the image;<br />
Height: Height of the image;<br />
Rotate: Rotate degree;<br />
Color: Initial color of the image;<br />
</pre><br />
<br />
*Select image buffer: this function is used to select the image buffer. You can create multiple image buffer with last function, then select the buffer for every image.<br />
<pre>void Paint_SelectImage(UBYTE *image)<br />
Parameters:<br />
image: The name of image buffer, it is a pointer of buffer address;<br />
</pre><br />
<br />
*Set display orientation: This function is used to set the rotate degree, it is generally be used after Paint_SelectImage(). You can set the rotate degree to 0、90、180、270 degree.<br />
<pre>void Paint_SetRotate(UWORD Rotate)<br />
Parameters:<br />
Rotate: Rotate degree, you can choose ROTATE_0、ROTATE_90、ROTATE_180、ROTATE_270 which stands for 0、90、180、270 degree repetitively.<br />
</pre><br />
<br />
*Image mirroring: This function is used to mirror image.<br />
<pre>void Paint_SetMirroring(UBYTE mirror)<br />
Parameters:<br />
mirror: You can set it to MIRROR_NONE、MIRROR_HORIZONTAL、MIRROR_VERTICAL、MIRROR_ORIGIN<br />
</pre><br />
et pixel: this function is used to set the position and color of pixels in the buffer. This is the basic function of GUI.<br />
<pre><br />
void Paint_SetPixel(UWORD Xpoint, UWORD Ypoint, UWORD Color)<br />
Parameters:<br />
Xpoint: X-axes in buffer;<br />
Ypoint: Y-axes in buffer;<br />
Color : color<br />
</pre><br />
<br />
*Clear: This function is used to clear the screen to certain color.<br />
<pre><br />
void Paint_Clear(UWORD Color)<br />
Parameters:<br />
Color: <br />
</pre><br />
<br />
*Clear windows:this function is used to clear a window. It is generally used for time display.<br />
<pre><br />
void Paint_ClearWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of the window;<br />
Ystart: Start coordinate of Y-axes of the window;<br />
Xend: End coordinate of X-axes of the window;<br />
Yend: End coordinate of Y-axes of the window;<br />
Color: <br />
</pre><br />
<br />
*Draw point: Draw a point on the position (Xpoint, Ypoint)in buffer<br />
<pre><br />
void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_Style)<br />
Parameters:<br />
Xpoint: X coordinate of point;<br />
Ypoint: Y coordinate of point;<br />
Color: color of point;<br />
Dot_Pixel: the size of point, there are 8 sizes available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Dot_Style: style of point. <br />
typedef enum {<br />
DOT_FILL_AROUND = 1, <br />
DOT_FILL_RIGHTUP,<br />
} DOT_STYLE;<br />
</pre><br />
<br />
*Draw line: draw a line for (Xstart, Ystart) to (Xend, Yend)<br />
<pre><br />
void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, LINE_STYLE Line_Style , LINE_STYLE Line_Style)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of line;<br />
Ystart: Start coordinate of Y-axes of line;<br />
Xend: End coordinate of X-axes of line;<br />
Yend: End coordinate of Y-axes of line;<br />
Color: color of line<br />
Line_width: the width of line, 8 sizes are avalilable;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Line_Style:Style of the line;<br />
typedef enum {<br />
LINE_STYLE_SOLID = 0,<br />
LINE_STYLE_DOTTED,<br />
} LINE_STYLE;<br />
</pre><br />
<br />
*Draw rectangle: Draw a rectangle from (Xstart, Ystart) to (Xend, Yend).<br />
<pre><br />
void Paint_DrawRectangle(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of rectangle<br />
Ystart: Start coordinate of Y-axes of rectangle<br />
Xend: End coordinate of X-end of rectangle<br />
Yend: End coordinate of Y-end of rectangle<br />
Color: color of rectangle<br />
Line_width: The width of edges, 8 sides are available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: set the rectangle full or empty.<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw circle:Draw a circle, use (X_Center Y_Center) as center;<br />
<pre><br />
void Paint_DrawCircle(UWORD X_Center, UWORD Y_Center, UWORD Radius, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
X_Center: X coordinate of center<br />
Y_Center: Y coordinate of center<br />
Radius:Radius of circle<br />
Color: color of circle<br />
Line_width: width of circle, 8 sizes are avalilable<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: style of circle<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw character (ASCII): Set(Xstart Ystart) as letf-top point, draw a ASCII character.<br />
<pre><br />
void Paint_DrawChar(UWORD Xstart, UWORD Ystart, const char Ascii_Char, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
Ascii_Char:Ascii character;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of character;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Draw String: Set point (Xstart Ystart) as the left-top pixel, draw a string.<br />
<pre><br />
void Paint_DrawString_EN(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of characters;<br />
Ystart: Y coordinate of left-top pixel of characters;<br />
pString:Pointer of string<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw Chinese charactgers: this function is used to draw Chinese fonts based ON GB2312 fonts.<br />
<pre><br />
void Paint_DrawString_CN(UWORD Xstart, UWORD Ystart, const char * pString, cFONT* font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: Coordinate of left-top pixel of characters;<br />
Ystart: Coordinate of left-top pixel of characters;<br />
pString:Pointer of string;<br />
Font: GB2312 fonts:<br />
font12CN:11*21(ascii),16*21 (Chinese)<br />
font24CN:24*41(ascii),32*41 (Chinese)<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw number: Draw a string of numbers, (Xstart, Ystart) is the left-top pixel.<br />
<pre><br />
void Paint_DrawNum(UWORD Xpoint, UWORD Ypoint, int32_t Nummber, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel;<br />
Ystart: Y coordicate of left-to pixel;<br />
Nummber: the numbers displayed. the numbers are saved in int format, the maximum is 2147483647;<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of font;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Display time:Display time, (Xstart, Ystart) is the left-top pixel. This function is used for e-Paper which supports partial refresh<br />
<pre><br />
void Paint_DrawTime(UWORD Xstart, UWORD Ystart, PAINT_TIME *pTime, sFONT* Font, UWORD Color_Background, UWORD Color_Foreground)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
pTime:pointer of time displayed;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of fonts<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw image:send image data of bmp file to buffer<br />
<pre><br />
void Paint_DrawBitMap(const unsigned char* image_buffer)<br />
Parameters:<br />
image_buffer: adrress of image data in buffer<br />
</pre><br />
<br />
*Read local bmp picture and write it to buffer<br />
Linux platform like Jetson Nano and Raspberry Pi support to directly operate bmp pictures<br /><br />
Raspberry Pi & Jetson Nano:RaspberryPi&JetsonNano\c\lib\GUI\GUI_BMPfile.c(.h)<br /><br />
<pre><br />
UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)<br />
Parameters:<br />
path:The path of BMP pictures<br />
Xstart: X coordination of left-top of picture, default 0;<br />
Ystart: Y coordination of left-top of picture, default 0;<br />
</pre><br />
<br />
===Testing code===<br />
In the above part, we describe the tree structures of Linux codes, here we talk about the testing code for user.<br /><br />
Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\examples. The codes in examples are testing code, you can modify the definition in main.c file for different types of e-Paper.<br /><br />
<br />
For example, if you want to test 2.13inch e-paper, you need to delete the "//" symbol on line 32.<br /><br />
// EPD_2in13_V2_test();<br />
Change it to<br /><br />
EPD_2in13_V2_test();<br />
Then compile it again and run <br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==Python(Can be used for Jetson Nano\Raspberry Pi)==<br />
It is compatible with python2.7 and python3<br /><br />
python is easy to use than c codes<br /><br />
Raspberry Pi and Jetson Nano:RaspberryPi&JetsonNano\python\lib\<br /><br />
<br />
===epdconfig.py===<br />
*Initialize module and exit handle:<br />
<pre><br />
def module_init()<br />
def module_exit()<br />
</pre><br />
Note:<br />
1.The functions are used to set GPIP before and after driving e-Paper.<br />
2.If the board you have is printed with Rev2.1, module enter low-ultra mode after Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
<pre><br />
def digital_write(pin, value)<br />
def digital_read(pin)<br />
</pre><br />
<br />
*SPI Write data:<br />
<pre><br />
def spi_writebyte(data)<br />
</pre><br />
<br />
===epdxxx.py(xxx is the type of e-Paper)===<br />
*Initailize e-paper: this function should be used at the begining. It can also be used to wake up e-Paper from Sleep mode.<br />
<pre><br />
#For 2.13inch e-Paper、2.9inch e-Paper<br />
def init(self, update) # Choose lut_full_update or lut_partial_update<br />
#Other type<br />
def init(self)<br />
</pre><br />
<br />
*Clear e-paper: This function is used to clear e-Paper to white;<br />
<pre><br />
def Clear(self)<br />
def Clear(self, color) # Some types of e-Paper should use this function to clear screen<br />
</pre><br />
<br />
*Convert image to arrays<br />
<pre><br />
def getbuffer(self, image)<br />
</pre><br />
<br />
*Transmit one frame of image data and display<br />
<pre><br />
#For two-color e-paper<br />
def display(self, image)<br />
<br />
#Because that controllers of 2.13inch e-paper are updated, when partial refresh, they should first use displayPartBaseImage() to display static background, then use displayPart() to dynamaticlly display.<br />
def displayPartBaseImage(self, image)<br />
def displayPart(self, image)<br />
</pre><br />
<br />
*Enter sleep mode<br />
<pre><br />
def sleep(self)<br />
</pre><br />
<br />
===epd_xxx_test.py(xxx is type of e-paper)===<br />
python examples are saved in directory:<br /><br />
Raspberry Pi和Jetson Nano:RaspberryPi&JetsonNano\python\examples\<br /><br />
<br />
f the python installed in your OS is python2, you should run examples like below:<br /><br />
<pre><br />
sudo python epd_2in13_V2_test.py<br />
</pre><br />
If it is python3, the commands should be:<br /><br />
<pre><br />
sudo python3 epd_2in13-V2_test.py<br />
</pre><br />
===Orientation===<br />
To rotate the display, you can use transpose function like blackimage = blackimage.transpose(Image.ROTATE_270):<br />
<pre><br />
blackimage = blackimage.transpose(Image.ROTATE_270) <br />
redimage = redimage.transpose(Image.ROTATE_270)<br />
#Support ROTATE_90, ROTATE_180, ROTATE_270<br />
</pre><br />
<br />
<br />
===GUI===<br />
Python has a powerful PIL library [http://effbot.org/imagingbook PIL link], which can be used directly to drawing figures. Here we use it for drawing<br /><br />
*Install the library firstly<br />
<pre><br />
sudo apt-get install python3-pil <br />
</pre><br />
<br />
Import the library<br /><br />
<pre><br />
from PIL import Image,ImageDraw,ImageFont<br />
</pre><br />
Image: library; ImageDraw: drawing function; ImageFont: fonts<br /><br />
<br />
*Set image buffer for drawing. <br />
<pre><br />
image = Image.new('1', (epd.width, epd.height), 255) # 255: clear the frame<br />
</pre><br />
The first parameter is the depth of color, 1 means 2 grayscale. The second parameter is a tuple of image size. The third parameter is color of the image, 0 is black and 255 is white.<br /><br />
<br />
*Create an image object.<br />
<pre><br />
draw = ImageDraw.Draw(image)<br />
</pre><br />
<br />
*Draw rectangle<br />
<pre><br />
draw.rectangle((0, 10, 200, 34), fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination. 0, 10 is the top-left point of rectangle, 200, 34) is the right-bottom point. fille = 0 set the filled color to black.<br /><br />
<br />
*Draw line<br />
<pre><br />
draw.line((16, 60, 56, 60), fill = 0)<br />
</pre><br />
The first parameter is a type of coordination, 16, 60 is the begin point, 200, 34 is the end point. fill=0 set the line to black<br /><br />
<br />
*Draw circle<br />
<pre><br />
draw.arc((90, 60, 150, 120), 0, 360, fill = 0)<br />
</pre><br />
This function is used to draw a encircle of a square. The first parameter is a tuple of coordination of the square. the degree of the circle is 0 to 360 °, fille=0 set the circle to black.<br /><br />
If the figure is not square according to the coordination, you will get an ellipse.。<br /><br />
<br />
Besides the arc function, you can also use chord function for drawing solid circle.<br /><br />
<pre><br />
draw.chord((90, 130, 150, 190), 0, 360, fill = 0)<br />
</pre><br />
The first parameter is the coordination of the enclosing rectangle. The second and third parameters are the beginning and end degrees of the circle. The fourth parameter is the fill color of the circle.<br /><br />
<br />
*Character<br />
You can directkt import ImageFont model for drawing characters:<br /><br />
<pre><br />
font = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)<br />
</pre><br />
You can use the fonts of Windows or other fonts which is in ttc format.<br /><br />
<br />
To draw English character, you can directly use the fonts; for Chinese character, you need to add a symbol u:<br /><br />
<pre><br />
draw.text((8, 12), 'hello world', font = font, fill = 255)<br />
draw.text((8, 36), u'电子墨水屏', font = font, fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination of character, the second parameter is the font and las one is set the color.<br /><br />
<br />
*Read local picture<br />
<pre><br />
image = Image.open(os.path.join(picdir, '2in13-v2.bmp'))<br />
</pre><br />
The parameter is the path of picture.<br />
<br />
*Other functions.<br />
For more information of the PIL library, please refer to http://effbot.org/imagingbook.</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:E-paper_for_rpi_and_jetsonano_code_description&diff=363Template:E-paper for rpi and jetsonano code description2020-07-29T08:14:20Z<p>INKU-admin123: /* C */</p>
<hr />
<div>RaspberryPi and Jetson nano uses the same libraries, as they are compatible with each other in a way.<br /><br />
The codes include bottom hardware interface, middle EPD driver and application;<br /><br />
<br />
==C==<br />
===Bottom hardware interface===<br />
We package the bottom for different hardware platform.<br /><br />
Most of the interfaces are defined in DEV_Config.c(.h) files:RaspberryPi&JetsonNano\c\lib\Config<br /><br />
Two libraries are used for C codes: BCM2835 and WiringPi<br /><br />
By default, we use WiringPI, if you want to change to BCM2835, you can modify RaspberryPi&JetsonNano\c\Makefile file and modify the line 13 and lin 14 as below::<br /><br />
[[file:e-paper_Driver_HAT_RPI_Makefile.png|700px]]<br />
*Data type:<br />
#define UBYTE uint8_t<br />
#define UWORD uint16_t<br />
#define UDOUBLE uint32_t<br />
*Initialize model and exit:<br />
void DEV_Module_Init(void);<br />
void DEV_Module_Exit(void);<br />
Notice:<br />
1. The functions are used to handle GPIO before initializing the e-Paper and after exiting.<br />
2. If the board you have is printed with Rev2.1, the module enters low-ultra mode after DEV_Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
void DEV_Digital_Write(UWORD Pin, UBYTE Value);<br />
UBYTE DEV_Digital_Read(UWORD Pin);<br />
*SPI Write data<br />
void DEV_SPI_WriteByte(UBYTE Value);<br />
<br />
===Middle EPD driver===<br />
The EPD driver are saved in RaspberryPi&JetsonNano\c\lib\e-Paper<br /><br />
Open .h file you can get the functions below<br /><br />
*Initialization: It should be used to initialize e-Paper or wakeup e-Paper from sleep mode.<br />
'''/2.13inch e-Paper、2.9inch e-Paper<br />
void EPD_xxx_Init(UBYTE Mode); // Mode = 0 Initialize full refresh; Mode = 1 Initilize partial refresh <br />
'''//4.2inch e-Paper<br />
void EPD_xxx_Init(void);<br />
xxx is the type of e-paper<br />
<br />
*Clear display: This function is used to clear the e-paper to white<br />
void EPD_xxx_Clear(void); <br />
xxx is the type of e-paper, for example, if the e-paper is 2.13inch e-paper, it should be EPD_2IN13_V2_Clear(); if it is 2.9inch e-paper, it should be EPD_2IN9_Clear()<br /><br />
<br />
*Transmit a frame of image and display<br />
'''//Blac/White e-Paper<br />
void EPD_xxx_Display(UBYTE *Image);<br />
'''//Three colors e-Paper<br />
void EPD_xxx_Display(const UBYTE *blackimage, const UBYTE *ryimage);<br />
<br />
'''// To partial refresh the 2.13inch e-paper, you should firstly use EPD_xxx_DisplayPartBaseImage function to display background, and then partial refresh by function EPD_xxx_DisplayPart()<br />
void EPD_2IN13_V2_DisplayPart(UBYTE *Image);<br />
void EPD_2IN13_V2_DisplayPartBaseImage(UBYTE *Image);<br />
<br />
*Enter sleep mode<br />
void EPD_xxx_Sleep(void);<br />
You should hardware reset or use initialize function to wake up e-Paper from sleep mode<br /><br />
xxx is the type of e-Paper, if it is 2.13, you should use EPD_2IN13_V2_Sleep()<br /><br />
<br />
===Application functions===<br />
Basic drawing functions are provided here. You can find then in: Raspbian Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\GUI\GUI_Paint.c(.h)<br /><br />
<br />
The fonts are saved in the directory: Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\lib\Fonts<br /><br />
<br />
*Create a new image buffer: This function is used to create a new image with width, height, Rotate degree and its color.<br />
<pre><br />
void Paint_NewImage(UBYTE *image, UWORD Width, UWORD Height, UWORD Rotate, UWORD Color)<br />
Parameters:<br />
image: The buffer of the image, this is a pointer of buffer address;<br />
Width: width of the image;<br />
Height: Height of the image;<br />
Rotate: Rotate degree;<br />
Color: Initial color of the image;<br />
</pre><br />
<br />
*Select image buffer: this function is used to select the image buffer. You can create multiple image buffer with last function, then select the buffer for every image.<br />
<pre>void Paint_SelectImage(UBYTE *image)<br />
Parameters:<br />
image: The name of image buffer, it is a pointer of buffer address;<br />
</pre><br />
<br />
*Set display orientation: This function is used to set the rotate degree, it is generally be used after Paint_SelectImage(). You can set the rotate degree to 0、90、180、270 degree.<br />
<pre>void Paint_SetRotate(UWORD Rotate)<br />
Parameters:<br />
Rotate: Rotate degree, you can choose ROTATE_0、ROTATE_90、ROTATE_180、ROTATE_270 which stands for 0、90、180、270 degree repetitively.<br />
</pre><br />
<br />
*Image mirroring: This function is used to mirror image.<br />
<pre>void Paint_SetMirroring(UBYTE mirror)<br />
Parameters:<br />
mirror: You can set it to MIRROR_NONE、MIRROR_HORIZONTAL、MIRROR_VERTICAL、MIRROR_ORIGIN<br />
</pre><br />
et pixel: this function is used to set the position and color of pixels in the buffer. This is the basic function of GUI.<br />
<pre><br />
void Paint_SetPixel(UWORD Xpoint, UWORD Ypoint, UWORD Color)<br />
Parameters:<br />
Xpoint: X-axes in buffer;<br />
Ypoint: Y-axes in buffer;<br />
Color : color<br />
</pre><br />
<br />
*Clear: This function is used to clear the screen to certain color.<br />
<pre><br />
void Paint_Clear(UWORD Color)<br />
Parameters:<br />
Color: <br />
</pre><br />
<br />
*Clear windows:this function is used to clear a window. It is generally used for time display.<br />
<pre><br />
void Paint_ClearWindows(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of the window;<br />
Ystart: Start coordinate of Y-axes of the window;<br />
Xend: End coordinate of X-axes of the window;<br />
Yend: End coordinate of Y-axes of the window;<br />
Color: <br />
</pre><br />
<br />
*Draw point: Draw a point on the position (Xpoint, Ypoint)in buffer<br />
<pre><br />
void Paint_DrawPoint(UWORD Xpoint, UWORD Ypoint, UWORD Color, DOT_PIXEL Dot_Pixel, DOT_STYLE Dot_Style)<br />
Parameters:<br />
Xpoint: X coordinate of point;<br />
Ypoint: Y coordinate of point;<br />
Color: color of point;<br />
Dot_Pixel: the size of point, there are 8 sizes available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Dot_Style: style of point. <br />
typedef enum {<br />
DOT_FILL_AROUND = 1, <br />
DOT_FILL_RIGHTUP,<br />
} DOT_STYLE;<br />
</pre><br />
<br />
*Draw line: draw a line for (Xstart, Ystart) to (Xend, Yend)<br />
<pre><br />
void Paint_DrawLine(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, LINE_STYLE Line_Style , LINE_STYLE Line_Style)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of line;<br />
Ystart: Start coordinate of Y-axes of line;<br />
Xend: End coordinate of X-axes of line;<br />
Yend: End coordinate of Y-axes of line;<br />
Color: color of line<br />
Line_width: the width of line, 8 sizes are avalilable;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Line_Style:Style of the line;<br />
typedef enum {<br />
LINE_STYLE_SOLID = 0,<br />
LINE_STYLE_DOTTED,<br />
} LINE_STYLE;<br />
</pre><br />
<br />
*Draw rectangle: Draw a rectangle from (Xstart, Ystart) to (Xend, Yend).<br />
<pre><br />
void Paint_DrawRectangle(UWORD Xstart, UWORD Ystart, UWORD Xend, UWORD Yend, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
Xstart: Start coordinate of X-axes of rectangle<br />
Ystart: Start coordinate of Y-axes of rectangle<br />
Xend: End coordinate of X-end of rectangle<br />
Yend: End coordinate of Y-end of rectangle<br />
Color: color of rectangle<br />
Line_width: The width of edges, 8 sides are available;<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: set the rectangle full or empty.<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw circle:Draw a circle, use (X_Center Y_Center) as center;<br />
<pre><br />
void Paint_DrawCircle(UWORD X_Center, UWORD Y_Center, UWORD Radius, UWORD Color, DOT_PIXEL Line_width, DRAW_FILL Draw_Fill)<br />
Parameters:<br />
X_Center: X coordinate of center<br />
Y_Center: Y coordinate of center<br />
Radius:Radius of circle<br />
Color: color of circle<br />
Line_width: width of circle, 8 sizes are avalilable<br />
typedef enum {<br />
DOT_PIXEL_1X1 = 1, // 1 x 1<br />
DOT_PIXEL_2X2 , // 2 X 2<br />
DOT_PIXEL_3X3 , // 3 X 3<br />
DOT_PIXEL_4X4 , // 4 X 4<br />
DOT_PIXEL_5X5 , // 5 X 5<br />
DOT_PIXEL_6X6 , // 6 X 6<br />
DOT_PIXEL_7X7 , // 7 X 7<br />
DOT_PIXEL_8X8 , // 8 X 8<br />
} DOT_PIXEL;<br />
Draw_Fill: style of circle<br />
typedef enum {<br />
DRAW_FILL_EMPTY = 0,<br />
DRAW_FILL_FULL,<br />
} DRAW_FILL;<br />
</pre><br />
<br />
*Draw character (ASCII): Set(Xstart Ystart) as letf-top point, draw a ASCII character.<br />
<pre><br />
void Paint_DrawChar(UWORD Xstart, UWORD Ystart, const char Ascii_Char, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
Ascii_Char:Ascii character;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of character;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Draw String: Set point (Xstart Ystart) as the left-top pixel, draw a string.<br />
<pre><br />
void Paint_DrawString_EN(UWORD Xstart, UWORD Ystart, const char * pString, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of characters;<br />
Ystart: Y coordinate of left-top pixel of characters;<br />
pString:Pointer of string<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw Chinese charactgers: this function is used to draw Chinese fonts based ON GB2312 fonts.<br />
<pre><br />
void Paint_DrawString_CN(UWORD Xstart, UWORD Ystart, const char * pString, cFONT* font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: Coordinate of left-top pixel of characters;<br />
Ystart: Coordinate of left-top pixel of characters;<br />
pString:Pointer of string;<br />
Font: GB2312 fonts:<br />
font12CN:11*21(ascii),16*21 (Chinese)<br />
font24CN:24*41(ascii),32*41 (Chinese)<br />
Color_Foreground: color of string<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw number: Draw a string of numbers, (Xstart, Ystart) is the left-top pixel.<br />
<pre><br />
void Paint_DrawNum(UWORD Xpoint, UWORD Ypoint, int32_t Nummber, sFONT* Font, UWORD Color_Foreground, UWORD Color_Background)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel;<br />
Ystart: Y coordicate of left-to pixel;<br />
Nummber: the numbers displayed. the numbers are saved in int format, the maximum is 2147483647;<br />
Font: 5 fonts are available:<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of font;<br />
Color_Background: color of background;<br />
</pre><br />
<br />
*Display time:Display time, (Xstart, Ystart) is the left-top pixel. This function is used for e-Paper which supports partial refresh<br />
<pre><br />
void Paint_DrawTime(UWORD Xstart, UWORD Ystart, PAINT_TIME *pTime, sFONT* Font, UWORD Color_Background, UWORD Color_Foreground)<br />
Parameters:<br />
Xstart: X coordinate of left-top pixel of character;<br />
Ystart: Y coordinate of left-top pixel of character;<br />
pTime:pointer of time displayed;<br />
Font: 5 fonts are available;<br />
font8:5*8<br />
font12:7*12<br />
font16:11*16<br />
font20:14*20<br />
font24:17*24<br />
Color_Foreground: color of fonts<br />
Color_Background: color of background<br />
</pre><br />
<br />
*Draw image:send image data of bmp file to buffer<br />
<pre><br />
void Paint_DrawBitMap(const unsigned char* image_buffer)<br />
Parameters:<br />
image_buffer: adrress of image data in buffer<br />
</pre><br />
<br />
*Read local bmp picture and write it to buffer<br />
Linux platform like Jetson Nano and Raspberry Pi support to directly operate bmp pictures<br /><br />
Raspberry Pi & Jetson Nano:RaspberryPi&JetsonNano\c\lib\GUI\GUI_BMPfile.c(.h)<br /><br />
<pre><br />
UBYTE GUI_ReadBmp(const char *path, UWORD Xstart, UWORD Ystart)<br />
Parameters:<br />
path:The path of BMP pictures<br />
Xstart: X coordination of left-top of picture, default 0;<br />
Ystart: Y coordination of left-top of picture, default 0;<br />
</pre><br />
<br />
===Testing code===<br />
In the above part, we describe the tree structures of Linux codes, here we talk about the testing code for user.<br /><br />
Raspberry Pi & Jetson Nano: RaspberryPi&JetsonNano\c\examples. The codes in examples are testing code, you can modify the definition in main.c file for different types of e-Paper.<br /><br />
<br />
For example, if you want to test 2.13inch e-paper, you need to delete the "//" symbol on line 32.<br /><br />
// EPD_2in13_V2_test();<br />
Change it to<br /><br />
EPD_2in13_V2_test();<br />
Then compile it again and run <br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==Python(Can be used for Jetson Nano\Raspberry Pi)==<br />
It is compatible with python2.7 and python3<br /><br />
python is easy to use than c codes<br /><br />
Raspberry Pi和Jetson Nano:RaspberryPi&JetsonNano\python\lib\<br /><br />
<br />
===epdconfig.py===<br />
*Initialize module and exit handle:<br />
<pre><br />
def module_init()<br />
def module_exit()<br />
</pre><br />
Note:<br />
1.The functions are used to set GPIP before and after driving e-Paper.<br />
2.If the board you have is printed with Rev2.1, module enter low-ultra mode after Module_Exit(). (as we test, the current is about 0 in this mode);<br />
*GPIO Read/Write:<br />
<pre><br />
def digital_write(pin, value)<br />
def digital_read(pin)<br />
</pre><br />
<br />
*SPI Write data:<br />
<pre><br />
def spi_writebyte(data)<br />
</pre><br />
<br />
===epdxxx.py(xxx is the type of e-Paper)===<br />
*Initailize e-paper: this function should be used at the begining. It can also be used to wake up e-Paper from Sleep mode.<br />
<pre><br />
#For 2.13inch e-Paper、2.9inch e-Paper<br />
def init(self, update) # Choose lut_full_update or lut_partial_update<br />
#Other type<br />
def init(self)<br />
</pre><br />
<br />
*Clear e-paper: This function is used to clear e-Paper to white;<br />
<pre><br />
def Clear(self)<br />
def Clear(self, color) # Some types of e-Paper should use this function to clear screen<br />
</pre><br />
<br />
*Convert image to arrays<br />
<pre><br />
def getbuffer(self, image)<br />
</pre><br />
<br />
*Transmit one frame of image data and display<br />
<pre><br />
#For two-color e-paper<br />
def display(self, image)<br />
<br />
#Because that controllers of 2.13inch e-paper are updated, when partial refresh, they should first use displayPartBaseImage() to display static background, then use displayPart() to dynamaticlly display.<br />
def displayPartBaseImage(self, image)<br />
def displayPart(self, image)<br />
</pre><br />
<br />
*Enter sleep mode<br />
<pre><br />
def sleep(self)<br />
</pre><br />
<br />
===epd_xxx_test.py(xxx is type of e-paper)===<br />
python examples are saved in directory:<br /><br />
Raspberry Pi和Jetson Nano:RaspberryPi&JetsonNano\python\examples\<br /><br />
<br />
f the python installed in your OS is python2, you should run examples like below:<br /><br />
<pre><br />
sudo python epd_2in13_V2_test.py<br />
</pre><br />
If it is python3, the commands should be:<br /><br />
<pre><br />
sudo python3 epd_2in13-V2_test.py<br />
</pre><br />
===Orientation===<br />
To rotate the display, you can use transpose function like blackimage = blackimage.transpose(Image.ROTATE_270):<br />
<pre><br />
blackimage = blackimage.transpose(Image.ROTATE_270) <br />
redimage = redimage.transpose(Image.ROTATE_270)<br />
#Support ROTATE_90, ROTATE_180, ROTATE_270<br />
</pre><br />
<br />
<br />
===GUI===<br />
Python has a powerful PIL library [http://effbot.org/imagingbook PIL link], which can be used directly to drawing figures. Here we use it for drawing<br /><br />
*Install the library firstly<br />
<pre><br />
sudo apt-get install python3-pil <br />
</pre><br />
<br />
Import the library<br /><br />
<pre><br />
from PIL import Image,ImageDraw,ImageFont<br />
</pre><br />
Image: library; ImageDraw: drawing function; ImageFont: fonts<br /><br />
<br />
*Set image buffer for drawing. <br />
<pre><br />
image = Image.new('1', (epd.width, epd.height), 255) # 255: clear the frame<br />
</pre><br />
The first parameter is the depth of color, 1 means 2 grayscale. The second parameter is a tuple of image size. The third parameter is color of the image, 0 is black and 255 is white.<br /><br />
<br />
*Create an image object.<br />
<pre><br />
draw = ImageDraw.Draw(image)<br />
</pre><br />
<br />
*Draw rectangle<br />
<pre><br />
draw.rectangle((0, 10, 200, 34), fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination. 0, 10 is the top-left point of rectangle, 200, 34) is the right-bottom point. fille = 0 set the filled color to black.<br /><br />
<br />
*Draw line<br />
<pre><br />
draw.line((16, 60, 56, 60), fill = 0)<br />
</pre><br />
The first parameter is a type of coordination, 16, 60 is the begin point, 200, 34 is the end point. fill=0 set the line to black<br /><br />
<br />
*Draw circle<br />
<pre><br />
draw.arc((90, 60, 150, 120), 0, 360, fill = 0)<br />
</pre><br />
This function is used to draw a encircle of a square. The first parameter is a tuple of coordination of the square. the degree of the circle is 0 to 360 °, fille=0 set the circle to black.<br /><br />
If the figure is not square according to the coordination, you will get an ellipse.。<br /><br />
<br />
Besides the arc function, you can also use chord function for drawing solid circle.<br /><br />
<pre><br />
draw.chord((90, 130, 150, 190), 0, 360, fill = 0)<br />
</pre><br />
The first parameter is the coordination of the enclosing rectangle. The second and third parameters are the beginning and end degrees of the circle. The fourth parameter is the fill color of the circle.<br /><br />
<br />
*Character<br />
You can directkt import ImageFont model for drawing characters:<br /><br />
<pre><br />
font = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)<br />
</pre><br />
You can use the fonts of Windows or other fonts which is in ttc format.<br /><br />
<br />
To draw English character, you can directly use the fonts; for Chinese character, you need to add a symbol u:<br /><br />
<pre><br />
draw.text((8, 12), 'hello world', font = font, fill = 255)<br />
draw.text((8, 36), u'电子墨水屏', font = font, fill = 0)<br />
</pre><br />
The first parameter is a tuple of coordination of character, the second parameter is the font and las one is set the color.<br /><br />
<br />
*Read local picture<br />
<pre><br />
image = Image.open(os.path.join(picdir, '2in13-v2.bmp'))<br />
</pre><br />
The parameter is the path of picture.<br />
<br />
*Other functions.<br />
For more information of the PIL library, please refer to http://effbot.org/imagingbook.</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:SIM7600CE-4G-HAT_Manual&diff=362Template:SIM7600CE-4G-HAT Manual2020-07-13T02:12:28Z<p>INKU-admin123: Text replacement - "wget http://{{SERVERNAME}}" to "wget http://www.ingcool.com"</p>
<hr />
<div>== Testing ==<br />
=== Hardware setting ===<br />
*This module comes with GSM antenna, LTE antenna and micro USB cable. Besides these you should prepare:<br />
**A 4G sim card<br />
**A microphone cable<br />
**A Micro SD card (Optional)<br />
*Insert the SIM card to the card slot, Insert the headphone cable and connect the LTE antenna.<br /><br />
<div><ul> <br />
<li style="display: inline-block;"> [[File:SIM7600X 4G HAT (5).png|thumb|none|400px|back side]] </li><br />
<li style="display: inline-block;"> [[File:SIM7600X 4G HAT (7).jpg|thumb|none|400px|front size]] </li><br />
</ul><br />
</div><br />
*Connect the USB interface of SIM7600E-H 4G HAT to PC with a micro USB cable. Then the PWR indicator will keep bright.<br />
*Press the PWRKEY button and hold for 1s, the NET indicator will blink 1 time per second.<br />
*Open Device Manager to check the COM ports<br />[[File:Sim7600x-4G-HAT-wiki-1.jpg|600px]]<br />
*Install SIM7600 driver([http://www.waveshare.net/w/upload/e/e6/SIM7600-Driver.7z driver])<br />
<font color="red">'''【Note】The default hardware of SIM7600CE 4G HAT needs to be turned on by button. If the hardware needs to be turned on automatically, you can use a connection line to connect the PWR and GND pins on the module pin, so that it can automatically turn on, as shown in the figure below'''</font><br /><br />
[[File:SIM7600X 4G HAT (3).png|600px]]<br />
== Testing it with AT commands ==<br />
=== General AT commands ===<br />
<br />[[File:Sim7600x-4G-HAT-wiki-3.jpg|thumb|680px]]<br /><br />
{| class="wikitable"<br />
|-<br />
! Command !! Description !! Return<br />
|-<br />
| AT || AT test command || OK<br />
|-<br />
| ATE || ATE1: Enable echo<br /> ATE0: Disable echo|| OK<br />
|-<br />
| AT+CGMI || Module manufacturers|| OK<br />
|-<br />
| AT+CGMM || Module model || OK<br />
|-<br />
| AT+CGSN || Serial number || OK<br />
|-<br />
| AT+CSUB || Module revision || OK<br />
|-<br />
| AT+CGMR || Firmware revision || OK<br />
|-<br />
| AT+IPREX || Set baud rate || +IPREX:<br />OK<br />
|-<br />
| AT+CRESET || Reset module || OK<br />
|-<br />
| AT+CSQ || Check signal quality || +CSQ: 17,99<br />OK<br />
|-<br />
| AT+CPIN? || SIM Card Status || +CPIN: READY<br />
|-<br />
| AT+COPS? || Operator selection || +COPS:<br />OK<br />
|-<br />
| AT+CREG? || Network registration || +CREG:<br />OK<br />
|-<br />
| AT+CPSI? || UE system infor || <br />
|-<br />
|AT+CNMP || Mode selection:<br />2:Automatic<br />13:GSM only<br />38:LTE only<br />48 : Any modes but LTE<br />... .... || OK<br />
|}<br />
<font color="red">For more details, please refer to the documentation: SIM7500_SIM7600 Series_AT Command Manual_V1.07 </font><br />
<div class="sep0px"></div><br />
=== '''Raspberry Pi use 4G''' ===<br />
*Insert the module to 40PIN GPIO of Raspberry Pi, connect the USB interface of 4G module to USB port of Pi, and start it.:<br />
[[File:SIM7600X 4G HAT (7).jpg|600px|Hardware connection]]<br />
*Initialize Raspberry Pi according to [[#Initailize Raspberry Pi | Initialize Raspberry Pi]]<br />
*Refer to the guide below for networking. (Recommend you use USB port for faster speed):<br />
**[[#Networking via wwan0 Interface]]<br /><br />
*If the network work abnormally, please check set the DNS by commands below for a try:<br />
route add -net 0.0.0.0 ppp0<br />
<br />
== Test GPS ==<br />
*Connecting the GPS antenna, and place the receiver on open area outdoor<br />
*AT Commands used<br />
AT+CGPS=1 //Enable GPS<br />
AT+CGPSINFO //Print GPS information to serial port<br />
AT+CGPS=0 //Disable GPS<br />
[[File:Sim7600x-4G-HAT-wiki-7.jpg|600px]]<br />
<br />
== TCP/IP Connection ==<br />
<font color="red">Please make sure that your SIM card supports GPRS services.</font><br /> <br />
#Assemble the SIM card, connect all the antenna, and connect the module to PC by USB cable.<br />
#Press the PWR button to power on the module and wait for a dozen seconds. <br />
#Mkae sure that all the indicator light normally.<br />
=== Set the local virtual servers settings ===<br />
Virtual servers define the mapping between service ports of WAN and web servers of LAN. All requests from the Internet to service ports of WAN will be redirected to the computer (webservers of LAN) specified by the server IP. (see your router’s guide manual))<br /><br />
#Log in Management Console of your router with a browser (read your router’s guide manual for specific address)<br />
#Set Port::2317(The Port can’t conflict to others. Here we set2317)<br />
#Set LAN IP address of your computer (you can run CMD on your computer, and execute commands config to inquiry the address of IPv4), 192.168.1.168 as examples<br /><br />
=== Get WAN IP ===<br />
You can search “IP” on the browser to get your WAN IP address<br /><br />
[[File:Sim7600x-4G-HAT-wiki-8.jpg|1000px]]<br />
=== Set GPRS ===<br />
AT+CGDCONT=1,"IP","CMNET" //Set APN<br />
AT+CSQ //Check the quality of the signal, bigger the value, stronger the signal.<br />
AT+CREG? //GPRS network status<br />
AT+CIPMODE=1 //TCP/IP mode<br />
AT+CSOCKSETPN=1 //PDP profile number<br />
AT+CIPMODE=0 //Choose TCP/IP mode<br />
AT+NETOPEN //Open socket<br />
AT+CIPOPEN=0,"TCP","113.81.233.65",2317 //establish connection<br />
AT+CIPSEND=0,9, //Send data of a specific size<br />
1A //(HEX format) Tell module to send data<br />
AT+CIPCLOSE=0, //close connection<br />
AT+NETCLOSE, //Close socket<br />
<br />
== Test TF card==<br />
1. Plug the SIM card, connect the LTE antenna, and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to power on<br />
<br />
[[File:SIM7600X 4G HAT (5).png|600px]]<br />
<br />
2. User command to use TF card<br />
AT+FSCD=D: //Choose the path of TF card <br />
+FSCD: D:/<br />
OK<br />
AT+FSLS //Check subdirecotry<br />
+FSLS: SUBDIRECTORIES: <br />
overlays<br />
MyDir<br />
System Volume Information<br />
...<br />
...<br />
OK<br />
[[File:Sim7600x-4G-HAT-wiki-9.jpg|880px]]</ br><br />
3. Create file and write data to TF card<br />
Create MyDir folder in the root directory and create tx.txt in the folder, write data test content to the file by the following commands<br /><br />
AT+CFTRANRX="D:/MyDir/t1.txt",12 //file name<br />
>test content //data<br />
OK<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-10.jpg|880px]]<br />
<br />
4. Open file of TF card<br />
AT+CFTRANTX="D:/MyDir/t1.txt"<br />
+CFTRANTX: DATA,012<br />
test content<br />
+CFTRANTX: 0<br />
OK<br />
[[File:Sim7600x-4G-HAT-wiki-11.jpg|800px]]</ br><br />
[[File:Sim7600x-4G-HAT-wiki-12.jpg|800px]]<br />
<br />
For more information about the commands, please refer to SIM7500_SIM7600 Series_AT Command Manual_V1.07 P256~P268<br />
<br />
== Take calls ==<br />
*Connect the hardware and power on the SIM7600X module.<br />
*Commands for taking calls:<br /><br />
{| class="wikitable"<br />
|-<br />
! AT+CNUM || Phone number (Not all SIM cards Support) || +CNUM<br />OK<br />
|-<br />
| AT+CSDVC || AT+CSDVC=1:Handset output<br />AT+CSDVC=3:Speaker output|| OK<br />
|-<br />
| AT+CLVL=? || check volume level || OK<br />
|-<br />
| AT+CLVL=2 || volume level set to 2 || OK<br />
|-<br />
| ATD<phone_number>; || Make calls || OK<br />
|-<br />
| AT+CHUP || Hang up call || OK<br />
|-<br />
| AT+CLIP=1 || Phone ring || OK<br />
|-<br />
| ATA || Answer call|| OK<br />
|}<br />
[[File:Sim7600x-4G-HAT-wiki-13.jpg|600px|Take call]]<br /><br />
<div class="sep0px"></div><br />
<font color="red">【Note】: You need to check "new line" when using SSCOM to test</font><br />
== Send/Receive SMS ==<br />
#Plug the SIM card, connect the LTE antenna and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to <br />
#Check whether the indicators blink correctly (PWR’s and NET’s flashes).<br />
#Use commands below to send SMS<br />
{|class="wikitable"<br />
!Comamnd!! Description!! Return<br />
|-<br />
|AT+CMGF=1||select message format||OK<br />
|-<br />
|AT+CSCS="GSM"||Select TE character set: GSM||OK<br />
|-<br />
|AT+CSMP||set text mode para||OK<br />
|-<br />
|AT+CMGS="<phonenumber>"||Send message||OK<br />
|-<br />
|AT+CNMI=2,1||message indications||OK<br />
|-<br />
|AT+CMGR=1||Read message 1||OK<br />
|}<br />
[[File:Sim7600x-4G-HAT-wiki-14.jpg|700px|Send SMS]]<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-15.jpg|680px|Receive SMS]]<br />
<br />
== Working with Raspberry Pi ==<br />
===Hardware connection===<br />
The relationship between SIM7600 control pins and Raspberry Pi IOs is shown in Table:<br />
{| class="wikitable"<br />
|-<br />
! SIM7600X 4G HAT !! Raspberry Pi<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| RXD || TXD (BCM: 14)<br />
|-<br />
| TXD || RXD (BCM: 15)<br />
|-<br />
| PWR || P22 (BCM: P6)<br />
|-<br />
| FLIGHTMODE || P7 (BCM: P4), high active<br />
|}<br />
=== Initialize Raspberry Pi ===<br />
You need to set the SIM7600 module to the working mode first.<br />
*Download demo codes[http://{{SERVERNAME}}/w/images/2/29/SIM7600X-4G-HAT-Demo.7z demo codes],unzip it and recommend the folder Rspberry Pi/c as SIM7600X,and sopy it to /home/pi directory of Raspberry Pi<br />
*Go to /home/pi/SIM7600X directory and run the following command.<br />
chmod 777 sim7600_4G_hat_init<br />
*Set auto-run when booting:<br />
sudo nano /etc/rc.local<br />
*Add the line below in the from of exit 0:<br />
sh /home/pi/SIM7600X/sim7600_4G_hat_init<br />
[[File:Sim7600x-4G-HAT-wiki-19.jpg|600px]]<br />
<br />
=== Enable serial port ===<br />
For proper use, you need to disable the login shell and enable the hardware serial.<br />
sudo raspi-config<br />
Choose Interfacing Options ->Serial ->no -> yes,<br /><br />
<br />
===Networking via wwan0 Interface===<br />
1、Connect the USB interface of SIM7600 module to Rasberry Pi by USB cable<br />
<br />
2、Use ifconfig command to check wwan0 interface.<br />
<br />
3、Install libqmi and udhcpc<br />
sudo apt-get install libqmi-utils udhcpc -y<br />
3、Check the status of wwan0 interface:<br />
sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode<br />
: If the status is not online, you need to run the following command to configure it and test again.<br />
sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'<br />
4、Set wwan0 network<br />
<pre><br />
sudo qmicli -d /dev/cdc-wdm0 -w <br />
sudo ip link set wwan0 down <br />
sudo echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip<br />
sudo ip link set wwan0 up<br />
</pre><br />
<br />
5、 Set APN and connect to network.<br />
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='YOUR_APN',username='YOUR_USERNAME',password='YOUR_PASSWORD',ip-type=4" --client-no-release-cid<br />
:Note: the apn, username, password and other parameters should be modified according to the actual situation.<br />
:The user name of APN can be ignore sometimes. For examples:<br />
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='CMNET',ip-type=4" --client-no-release-cid<br />
<br />
6、User udhcpc to set router and IP<br />
sudo udhcpc -i wwan0<br />
7、Now you can disconnect the RJ45, turn off the WiFi and test the 4G network.<br />
<br />
=== Minicom test ===<br />
1、Connect the SIM7600 module and power on Raspberry Pi<br /><br />
2、Install minicom<br /><br />
sudo apt-get install minicom<br />
3、Use the command minicom -D /dev/ttyS0 for testing<br /><br />
Default baud rate: 115200<br /><br />
If you use Pi2B/zero, the serial port should be ttyAMA0<br /><br />
4、Send commands:<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-20.jpg|680px]]<br />
<br />
=== Demo codes ===<br />
1、Connect the SIM7600 module and power on Raspberry Pi<br /><br />
2、Dwonalod demo codes and copy it to /home/pi/ directory;<br />
wget http://www.ingcool.com/w/images/2/29/SIM7600X-4G-HAT-Demo.7z<br />
sudo apt-get install p7zip-full<br />
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/pi<br />
sudo chmod 777 -R /home/pi/SIM7600X-4G-HAT-Demo<br />
<br />
3、Enter the folder of bcm2835 compile and install BCM2835 libraries:<br />
chmod +x configure && ./configure && sudo make && sudo make install<br />
<br />
4、Enter the examples folder and run the codes as below:<br />
sudo make clean //Clean<br />
sudo make //compile <br />
sudo ./PhoneCall //run the codes<br />
You can also combine the commands:<br /><br />
sudo make clean && sudo make && sudo ./PhoneCall<br />
==== '''PHONECALL example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-21.jpg|600px]]<br />
==== '''SMS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-22.jpg|600px]]<br />
==== '''GPS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-23.jpg|600px]]<br />
===='''TCP example'''====<br />
[[File:Sim7600x-4G-HAT-wiki-24.jpg|600px]]<br />
==== '''FTP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-25.jpg|600px]]<br />
<br />
==Arduino example==<br />
=== Hardware connection ===<br />
Connect the SIM7600 module to UNO PLUS / Arduino UNO:<br />
{| class="wikitable"<br />
|-<br />
! SIM7600X 4G HAT !! UNO PLUS / Arduino UNO<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| TXD || 0 (RX)<br />
|-<br />
| RXD || 1 (TX)<br />
|-<br />
| PWR || 2<br />
|}<br />
=== Install Arduino Libraries ===<br />
Downloaad the demo codes and unzip it<br /><br />
Copy folder Waveshare_SIM7600X_Arduino_Library to libraries folder under the installation directory of Arduino IDE<br /><br />
Open Arduino IDE --> File -->Examples -->Waveshare SIM7600X,and run the examples:<br /><br />
[[File:Sim7600x-4G-HAT-wiki-26.jpg|600px]]<br />
=== Examples ===<br />
==== '''PHONECALL example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-27.jpg|600px]]<br />
==== '''SMS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-28.jpg|600px]]<br />
==== '''GPS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-29.jpg|600px]]<br />
==== '''TCP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-30.jpg|600px]]<br />
==== '''FTP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-31.jpg|600px]]<br />
<br />
==Jetson Nano Examples==<br />
===Hardware connection===<br />
Jetson Nano has the same 40PIN header as Raspberry Pi.<br />
<br />
[[File:SIM7600X 4G HAT (4).png|thumb|300px|connection]]<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
|-<br />
! scope="col" | SIM7600X 4G HAT<br />
! scope="col" | Jetson Nano<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| TXD || 10 (Board)<br />
|-<br />
| RXD || 8 (Board)<br />
|-<br />
| PWR || 31(Board)<br />
|}<br />
<br />
===Jetson Nano minicom test===<br />
1、Connect SIM7600X 4G HAT to Jetson Nano and power on it by pressing the PWRKERY key for 3s.将SIM7600X 4G HAT接入Jetson Nano中,按下PWRKER键三秒后开机<br \><br />
2、Access Jetson nano <br \><br />
3、Open a terminal and install minicom:<br />
sudo apt-get install minicom<br />
3、use the command to test module<br />
sudo minicom -D /dev/ttyTHS1 -b 115200<br />
4、 Send commands:<br \><br />
[[File:Sim7600x-4G-HAT-wiki-32.png|400px]]<br />
<br />
===Python Examples===<br />
Install libraries<br \><br />
sudo apt-get python3-pip<br />
sudo pip3 install pyserial<br />
sudo apt-get install p7zip<br />
Download the demo codes<br />
mkdir -p ~/Documents/SIM7600X_4G_HAT<br />
wget -P ~/Documents/SIM7600X_4G_HAT/ http://{{SERVERNAME}}/w/images/2/29/SIM7600X-4G-HAT-Demo.7z<br />
[[File:Sim7600x-4G-HAT-wiki-33.png|400px]]<br \><br />
Ener the folder of demo codes and unzip it<br />
cd ~/Documents/SIM7600X_4G_HAT/<br />
sudo p7zip --uncompress SIM7600X-4G-HAT-Demo.7z<br />
===='''AT'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the directoryJetson Nano/AT:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/AT/<br />
sudo python3 AT.py<br />
[[File:Sim7600x-4G-HAT-wiki-34.png|400px]]<br />
===='''GPS'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the directory Jetson Nano/GPS:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/GPS/<br />
sudo python3 GPS.py<br />
[[File:Sim7600x-4G-HAT-wiki-35.png|400px]]<br />
===='''PhoneCall'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the direcoryJetson Nano/PhoneCall:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/PhoneCall/<br />
sudo python3 PhoneCall.py<br />
:Note: You need to modify the number by modify the codes.<br />
[[File:Sim7600x-4G-HAT-wiki-36.png|400px]]<br />
===='''SMS'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br \><br />
Enter the directory Jetson Nano/SMS:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/SMS/<br />
sudo python3 SMS.py<br />
:Note: You need to change the phone number by modify the codes<br />
[[File:Sim7600x-4G-HAT-wiki-37.png|400px]]<br />
===='''TCP'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br>。<br \><br />
Enter the directory Jetson Nano/TCP:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/TCP/<br />
sudo python3 TCP.py<br />
:Note: you need to modify the address to the actual one.<br />
[[File:Sim7600x-4G-HAT-wiki-38.png|400px]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=IMX219-160_Camera&diff=361IMX219-160 Camera2020-07-13T02:12:20Z<p>INKU-admin123: Text replacement - "wget http://{{SERVERNAME}}" to "wget http://www.ingcool.com"</p>
<hr />
<div>==Introduction==<br />
IMX219 Camera, 800 megapixels and 160 FOV. Compatible with Jetson nano. You can also use it with CM3/CM3+ expansion boards like Raspberry Pi Compute Module IO board, Compute Module IO Board Plus, Compute Module POE Board board.<br />
<br />
==Specifications==<br />
*Sensor: Sony IMX219<br />
**Resolution: 3280x2464<br />
**8 Megapixels<br />
*Lens specifications:<br />
**CMOS size: 1/4inch<br />
**Aperture (F): 2.35<br />
**Focal Length: 3.15mm<br />
**Angle of View (diagonal): 160 degree<br />
**Distortion: <14.3%<br />
*4 screw holes<br />
**Used for attachment<br />
**Provides 3.3V power output<br />
==User Guide==<br />
===Hardware connection===<br />
*Connect the camera to CSI interface of Jetson Nano.Set the metal side of FFC into Heat-sink<br />
*:If you have B01 version Jetson Nano Developer Kit, connect one of the CSI interfaces.<br />
*Power on Jetson Nano<br />
*:Note that jetson Nano cannot support hot-plug, you need to restart it after connecting camera.<br />
===Test===<br />
*Open a terminal and run the following command for testing<br />
*:Note: you need to connect a HDMI display to Jetson Nano Developer Kit, otherwise the image of camera cannot be previewed.<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
*If you find that the image captured is red. You can try to download .isp file and installed:<br />
<pre><br />
wget http://www.ingcool.com/w/images/e/eb/Camera_overrides.tar.gz<br />
tar zxvf Camera_overrides.tar.gz <br />
sudo cp camera_overrides.isp /var/nvidia/nvcam/settings/<br />
sudo chmod 664 /var/nvidia/nvcam/settings/camera_overrides.isp<br />
sudo chown root:root /var/nvidia/nvcam/settings/camera_overrides.isp<br />
</pre><br />
【Note】The 12 in NV12 is number but not string.<br />
==Drive two cameras==<br />
If you want to use two camera at the same time(for B01), you can add parameter sensor-id=x to change the camera<br />
*Test video0<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
*Test video1<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
==Related link==<br />
*[https://developer.nvidia.com/embedded/downloads Jetson Download center]<br />
*[https://www.jetsonhacks.com/2019/04/02/jetson-nano-raspberry-pi-camera/ Use Opencv]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=4.2inch_e-Paper_Module&diff=3604.2inch e-Paper Module2020-07-13T02:11:10Z<p>INKU-admin123: /* Resources */</p>
<hr />
<div>==Introduction==<br />
This is 4.2inch e-Paper module, 400x300 resolution, SPI interface, supports black and white colors.<br />
==Features==<br />
*Szie: 4.2inch<br />
*Diemnsion(Raw panel):90.1mm × 77.0mm × 1.18mm<br />
*Dimenstion(PCBA):103.0mm x 78.5mm<br />
*Display area:84.8mm x 63.6mm<br />
*Operating voltage:3.3V/5V <br />
*Interface:SPI<br />
*Pitch:0.212 x 0.212<br />
*Resolution:400 x 300<br />
*Color: Black, White<br />
*Grayscale:2<br />
*Fully update: 4s<br />
*Consumption (update): 26.4mW(typ.) <br />
*Consumption (standby):<=0.017mW<br />
【Notices】:</ br><br />
Update time: The data provided is for reference, the actual time may be different according to the MCU. The e-Paper will flicker when updating, it is normal<br /><br />
Consumption: The data provided is for reference, the actual consumption may be different according to the driver board.<br /><br />
==SPI timing==<br />
[[File:e-paper-spi-timing.jpg|700px]]<br />
<br />
The e-Paper only supports writing, therefore the MISO pin is hidden.<br /><br />
CS is slave chip select, when CS is low, the chip is enabled.<br /><br />
DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.<br /><br />
SCLK is the SPI communication clock.<br /><br />
SDIN is the data line from the master to the slave in SPI communication.<br /><br />
Timing:CPHL=0, CPOL=0 (SPI0)<br /><br />
【Note】You can search more documents of SPI bus online.<br />
<br />
==Working protocol==<br />
===Pixel & Byte===<br />
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br /><br />
White:□,Bit 1<br /><br />
Black:■:Bit 0<br /><br />
*The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels<br /><br />
*For example, If we set first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:<br /><br />
[[file:e-paper_hardware_work_1.png]]<br /><br />
For computer, the data is saved in MSB format:<br /><br />
[[file:e-paper_hardware_work_2.png]]<br /><br />
So we can use two bytes for 16 pixels.<br /><br />
==User Guides==<br />
*[[E-paper for RPi Use|Raspberry Pi guide]]<br />
*[[E-paper for Jetsonnano Use|Jetson Nano guide]]<br />
*[[E-paper for STM32 Use|STM32 guide]]<br />
*[[E-paper for Arduino Use|Arduino guide]]<br />
<br />
==Resources==<br />
===Documents===<br />
*[http://{{SERVERNAME}}/w/images/5/57/2.13inch_e-Paper_HAT_Schematic.pdf Schematic]<br><br />
*[http://www.ingcool.com/w/images/6/6b/4.2inch-e-paper-datasheet.pdf 4.2inch e-Paper Datasheet]<br />
<br />
===Demo codes===<br />
*[http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z Demo codes]<br />
<br />
==FAQ==<br />
{{E-Paper FAQ}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=E-paper_for_RPi_Use&diff=359E-paper for RPi Use2020-07-13T02:10:49Z<p>INKU-admin123: Text replacement - "sudo wget http://{{SERVERNAME}}" to "sudo wget http://www.ingcool.com"</p>
<hr />
<div>=Working with Raspberry Pi=<br />
==Hardware connection==<br />
If the e-Paper has 40PIN harder, you can directly attach it on the 40PIN gpio of Raspberry Pi. If the e-Paper only has 8PIN connector, you can write it to Raspberry Pi according to the table below.<br /><br />
{|border=1; style="width:700px;" align="center"<br />
|+Connect to Raspberry Pi<br />
|- style="background:#228B22; color:white" align="center"<br />
|rowspan="2"|e-Paper<br />
| colspan="2" | Raspberry Pi<br />
|- style="background:#228B22; color:white" align="center"<br />
|BCM2835<br />
|Board<br />
|- align="center"<br />
|VCC||3.3V||3.3V<br />
|- align="center"<br />
|GND||GND||GND<br />
|-align="center"<br />
|DIN||MOSI||19<br />
|-align="center"<br />
|CLK||SCLK||23<br />
|-align="center"<br />
|CS||CE0||24<br />
|-align="center"<br />
|DC||25||22<br />
|-align="center"<br />
|RST||17||11<br />
|-align="center"<br />
|BUSY||24||18<br />
|}<br />
<br />
==Enable SPI interface==<br />
The e-Paper use the SPI interface for communicating, you need to enable the SPI interface firstly for proper use.<br />
*打开终端,输入指令进入raspi-config设置界面<br />
sudo raspi-config<br />
*Interfacing Options -> SPI -> Yes<br />
<br />
==Install libraries==<br />
*Install BCM2835, open a terminal and run the following commands:<br />
<pre><br />
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz<br />
tar zxvf bcm2835-1.60.tar.gz <br />
cd bcm2835-1.60/<br />
sudo ./configure<br />
sudo make<br />
sudo make check<br />
sudo make install<br />
</pre><br />
*Install wirignPi<br />
<pre><br />
sudo apt-get install wiringpi<br />
wget https://project-downloads.drogon.net/wiringpi-latest.deb<br />
sudo dpkg -i wiringpi-latest.deb<br />
gpio -v<br />
</pre><br />
*Install Python libraries<br />
<pre><br />
#python2<br />
sudo apt-get update<br />
sudo apt-get install python-pip<br />
sudo apt-get install python-pil<br />
sudo apt-get install python-numpy<br />
sudo pip install RPi.GPIO<br />
sudo pip install spidev<br />
#python3<br />
sudo apt-get update<br />
sudo apt-get install python3-pip<br />
sudo apt-get install python3-pil<br />
sudo apt-get install python3-numpy<br />
sudo pip3 install RPi.GPIO<br />
sudo pip3 install spidev<br />
</pre><br />
<br />
==Download demo codes==<br />
Open a terminal and run the following commands:<br /><br />
<pre><br />
sudo apt-get install p7zip-full<br />
sudo wget http://www.ingcool.com/w/images/5/50/E-Paper.7z<br />
7za X E-Paper.7z<br />
cd e-Paper/RaspberryPi\&JetsonNano/<br />
</pre><br />
<br />
==Run the codes==<br />
You need to go to the directory of RaspberryPi&JetsonNano and then run the command, otherwise, files are not exist.<br /><br />
;C <br />
*Modify the main.c file for certain type (e-Paper)<br />
<pre><br />
cd c<br />
sudo nano examples/main.c <br />
</pre><br />
For example: if the e-Paper you use is the 2.13inch e-Paper, you should remove the // symbol before the line EPD_2IN13_V2_test(). Then press Ctrl+X, then Y and Enter to save the file.<br /><br />
<br />
*Compile the codes<br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
;python <br />
*Enter python directory, and run the command ls -al,<br /><br />
<pre><br />
cd python/examples<br />
ls -al<br />
</pre><br />
*Run the commands according to the type of e-Pper. For example, if you want to drive the 2.13inch e-Paper<br /><br />
<pre><br />
# python2<br />
sudo python2.7 epd_2in13_V2_test.py<br />
# python3<br />
sudo python3 epd_2in13_V2_test.py<br />
</pre><br />
<br />
==API Description==<br />
{{e-paper_for_rpi_and_jetsonano_code_description}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=E-paper_for_Jetsonnano_Use&diff=358E-paper for Jetsonnano Use2020-07-13T02:07:48Z<p>INKU-admin123: Text replacement - "sudo wget http://{{SERVERNAME}}" to "sudo wget http://www.ingcool.com"</p>
<hr />
<div>Jetson nano use software SPI, whose speed will be slow than hardware spi.<br /><br />
=Hardware connection=<br />
Because the 40 PIN of Jetson Nano is compatible with Raspberry Pi, and the Jetson.GPIO library is compatible with RPi. GPIO as well, the connection of Jetson nano is the same as Raspberry Pi.<br />
{|border=1; style="width:700px;" align="center"<br />
|+Connect to Jetson Nano Developer Kit<br />
|- style="background:Black; color:white" align="center"<br />
|rowspan="2"|e-Paper<br />
| colspan="2" | Jetson Nano Developer Kit<br />
|- style="background:Black; color:white" align="center"<br />
|BCM2835<br />
|Board<br />
|- align="center"<br />
|VCC||3.3V||3.3V<br />
|- align="center"<br />
|GND||GND||GND<br />
|-align="center"<br />
|DIN||10(SPI0_MOSI)||19<br />
|-align="center"<br />
|CLK||11(SPI0_SCK||23<br />
|-align="center"<br />
|CS||8(SPI0_CS0)||24<br />
|-align="center"<br />
|DC||25||22<br />
|-align="center"<br />
|RST||17||11<br />
|-align="center"<br />
|BUSY||24||18<br />
|}<br />
<br />
=Software settings=<br />
===Install libraries===<br />
*Open a terminal and run the following commands to install libraries<br /><br />
<pre><br />
sudo apt-get update<br />
sudo apt-get install python3-pip<br />
sudo pip3 install Jetson.GPIO<br />
sudo groupadd -f -r gpio<br />
sudo usermod -a -G gpio your_user_name<br />
sudo cp /opt/nvidia/jetson-gpio/etc/99-gpio.rules /etc/udev/rules.d/<br />
sudo udevadm control --reload-rules && sudo udevadm trigger<br />
</pre><br />
【Note】your_user_name is the username, for example: waveshare<br /><br />
*Install I2C library<br /><br />
<pre><br />
sudo apt-get install python-smbus<br />
</pre><br />
*Install PIL library:<br /><br />
<pre><br />
sudo apt-get install python3-pil<br />
sudo apt-get install python3-numpy<br />
</pre><br />
<br />
=Download the demo codes=<br />
Open a terminal and run the following commands<br /><br />
<pre><br />
sudo apt-get install p7zip-full<br />
sudo wget http://www.ingcool.com/w/images/5/50/E-Paper.7z<br />
7za X E-Paper.7z<br />
cd e-Paper/RaspberryPi\&JetsonNano/<br />
</pre><br />
<br />
=Run examples=<br />
Please first go to the directory of RaspberryPi&JetsonNano and then run the following commands; another wilse the codes cannot be run properly<br /><br />
==C==<br />
*Modify main.c file for certain e-Paper type.<br />
<pre><br />
cd c<br />
sudo nano examples/main.c <br />
</pre><br />
For example, if you have 2.13inch e-paper, you should remove the "//" symbol in the front of line EPD_2IN13_V2(), then save it.<br /><br />
<br />
*Re-compile the codes<br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==python==<br />
*Enter python directory, and run command ls -al<br /><br />
<pre><br />
cd python/examples<br />
ls -al<br />
</pre><br />
<br />
*Run the script according to the type of e-paper, for example, run the codes of 2.13inch e-Paper<br /><br />
<pre><br />
# python2<br />
sudo python2.7 epd_2in13_V2_test.py<br />
# python3<br />
sudo python3 epd_2in13_V2_test.py<br />
</pre><br />
<br />
=Codes Drscription=<br />
{{e-paper_for_rpi_and_jetsonano_code_description}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=4.2inch_e-Paper_Module&diff=3574.2inch e-Paper Module2020-07-11T03:32:52Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>==Introduction==<br />
This is 4.2inch e-Paper module, 400x300 resolution, SPI interface, supports black and white colors.<br />
==Features==<br />
*Szie: 4.2inch<br />
*Diemnsion(Raw panel):90.1mm × 77.0mm × 1.18mm<br />
*Dimenstion(PCBA):103.0mm x 78.5mm<br />
*Display area:84.8mm x 63.6mm<br />
*Operating voltage:3.3V/5V <br />
*Interface:SPI<br />
*Pitch:0.212 x 0.212<br />
*Resolution:400 x 300<br />
*Color: Black, White<br />
*Grayscale:2<br />
*Fully update: 4s<br />
*Consumption (update): 26.4mW(typ.) <br />
*Consumption (standby):<=0.017mW<br />
【Notices】:</ br><br />
Update time: The data provided is for reference, the actual time may be different according to the MCU. The e-Paper will flicker when updating, it is normal<br /><br />
Consumption: The data provided is for reference, the actual consumption may be different according to the driver board.<br /><br />
==SPI timing==<br />
[[File:e-paper-spi-timing.jpg|700px]]<br />
<br />
The e-Paper only supports writing, therefore the MISO pin is hidden.<br /><br />
CS is slave chip select, when CS is low, the chip is enabled.<br /><br />
DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.<br /><br />
SCLK is the SPI communication clock.<br /><br />
SDIN is the data line from the master to the slave in SPI communication.<br /><br />
Timing:CPHL=0, CPOL=0 (SPI0)<br /><br />
【Note】You can search more documents of SPI bus online.<br />
<br />
==Working protocol==<br />
===Pixel & Byte===<br />
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br /><br />
White:□,Bit 1<br /><br />
Black:■:Bit 0<br /><br />
*The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels<br /><br />
*For example, If we set first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:<br /><br />
[[file:e-paper_hardware_work_1.png]]<br /><br />
For computer, the data is saved in MSB format:<br /><br />
[[file:e-paper_hardware_work_2.png]]<br /><br />
So we can use two bytes for 16 pixels.<br /><br />
==User Guides==<br />
*[[E-paper for RPi Use|Raspberry Pi guide]]<br />
*[[E-paper for Jetsonnano Use|Jetson Nano guide]]<br />
*[[E-paper for STM32 Use|STM32 guide]]<br />
*[[E-paper for Arduino Use|Arduino guide]]<br />
<br />
==Resources==<br />
===Documents===<br />
*[http://{{SERVERNAME}}/w/images/5/57/2.13inch_e-Paper_HAT_Schematic.pdf Schematic]<br><br />
*[http://{{SERVERNAME}}/w/images/e/e6/4.2inch-e-paper-datasheet.pdf 4.2inch e-Paper Datasheet]<br />
===Demo codes===<br />
*[http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z Demo codes]<br />
==FAQ==<br />
{{E-Paper FAQ}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=2.9inch_e-Paper_Module&diff=3562.9inch e-Paper Module2020-07-11T03:32:51Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>==Introduction==<br />
This is an 2.9inch e-Paper module, with 296x128 resolution, SPI interface. Supports Black and white color.<br />
==Features==<br />
*Size: 2.9 inch<br />
*Dimnesion:89.5mm × 38mm<br />
*Display area:66.89mm × 29.05mm<br />
*Operating voltage:3.3V/5V <br />
*Interface:SPI<br />
*Pitch:0.138 × 0.138<br />
*Resolution:296 × 128<br />
*Display color:Black, white<br />
*Gray scale:2<br />
*Partial update: 0.3s<br />
*Fully update:2s<br />
*Consumption (update): 26.4mW(typ.) <br />
*Consumption (standby): <=0.017mW<br />
【Notices】<br /><br />
Update time: The data provided is for reference, the actual time may be different according to the MCU. The e-Paper will flicker when updating, it is normal<br /><br />
Consumption: The data provided is for reference, the actual consumption may be different according to the driver board.<br /><br />
==SPI timing==<br />
[[File:e-paper-spi-timing.jpg|700px]]<br />
<br />
The e-Paper only supports writing, therefore the MISO pin is hidden.<br /><br />
CS is slave chip select, when CS is low, the chip is enabled.<br /><br />
DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.<br /><br />
SCLK is the SPI communication clock.<br /><br />
SDIN is the data line from the master to the slave in SPI communication.<br /><br />
Timing:CPHL=0, CPOL=0 (SPI0)<br /><br />
【Note】You can search more documents of SPI bus online.<br />
<br />
==Working protocol==<br />
===Pixel & Byte===<br />
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br /><br />
White: □ Bit 1<br /><br />
Black:■ Bit 0<br /><br />
*The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels。<br /><br />
*For example, If we set first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:<br /><br />
[[file:e-paper_hardware_work_1.png]]<br /><br />
For computer, the data is saved in MSB format:<br /><br />
[[file:e-paper_hardware_work_2.png]]<br /><br />
So we can use two bytes for 16 pixels.<br /><br />
==User Guides==<br />
*[[E-paper for RPi Use|Raspberry Pi guides]]<br />
*[[E-paper for Jetsonnano Use|Jetson Nano guides]]<br />
*[[E-paper for STM32 Use|STM32 guides]]<br />
*[[E-paper for Arduino Use|Arduino gudies]]<br />
<br />
==Resources==<br />
===Documents===<br />
*[http://{{SERVERNAME}}/w/images/5/57/2.13inch_e-Paper_HAT_Schematic.pdf Schematic]<br><br />
*[http://{{SERVERNAME}}/w/images/e/e6/2.9inch_e-Paper_Datasheet.pdf 2.9inch e-Paper Datasheet]<br />
===Demo codes===<br />
*[http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z Demo codes]<br />
==FAQ==<br />
{{E-Paper FAQ}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=2.13inch_e-Paper_HAT&diff=3552.13inch e-Paper HAT2020-07-11T03:32:38Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>==Introduction==<br />
This is 2.13inch e-Paper module, 250x122 resolution, SPI interface, supports black and white colors.<br />
==Features==<br />
*Size: 2.13 inch<br />
*Dimension(Raw panel):59.2mm × 29.2mm × 1.05mm<br />
*Dimension(PCBA):65mmx30.2mm<br />
*Display area:48.55mm × 23.71mm<br />
*Operating voltage:3.3V/5V <br />
*Interface:SPI<br />
*Pitch:0.194* 0.194<br />
*Resolution:250*122<br />
*Display colors:Black, White<br />
*Gray scale:2<br />
*Partial update :0.3s<br />
*Fully update :2s<br />
*Consumption (refresh) : 26.4mW(typ.) <br />
*Consumption (standby) :<=0.017mW<br />
【Notices】:<br />
Update time: The data provided is for reference, the actual time may be different according to the MCU. The e-Paper will flicker when updating, it is normal<br /><br />
Consumption: The data provided is for reference, the actual consumption may be different according to the driver board.<br /><br />
==SPI timing==<br />
[[File:e-paper-spi-timing.jpg|700px]]<br />
<br />
The e-Paper only supports writing, therefore the MISO pin is hidden.<br />
<br />
CS is slave chip select, when CS is low, the chip is enabled.<br /><br />
DC is data/command control pin, when DC = 0, write command, when DC = 1, write data.<br /><br />
SCLK is the SPI communication clock.<br /><br />
SDIN is the data line from the master to the slave in SPI communication.<br /><br />
Timing:CPHL=0, CPOL=0 (SPI0)<br /><br />
【Note】You can search more documents of SPI bus online.<br />
<br />
==Working protocol==<br />
===Pixel & Byte===<br />
We define the pixels in a monochrome picture, 0 is black and 1 is white.<br /><br />
White:□,Bit 1<br /><br />
Black:■:Bit 0<br /><br />
*The dot in the figure is called a pixel. As we know, 1 and 0 are used to define the color, therefore we can use one bit to define the color of one pixel, and 1 byte = 8pixels<br /><br />
*For example, If we set first 8 pixels to black and the last 8 pixels to white, we show it by codes, they will be 16 bit as below:<br /><br />
[[file:e-paper_hardware_work_1.png]]<br /><br />
For computer, the data is saved in MSB format:<br /><br />
[[file:e-paper_hardware_work_2.png]]<br /><br />
So we can use two bytes for 16 pixels.<br /><br />
==User Guides==<br />
*[[E-paper for RPi Use|Raspberry Pi User Guide]]<br />
*[[E-paper for Jetsonnano Use|Jetson Nano User Guide]]<br />
*[[E-paper for STM32 Use|STM32 User Guide]]<br />
*[[E-paper for Arduino Use|Arduino User Guide]]<br />
<br />
==Resources==<br />
===Document===<br />
*[http://{{SERVERNAME}}/w/images/5/57/2.13inch_e-Paper_HAT_Schematic.pdf Schematic]<br><br />
===Demo codes===<br />
*[http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z Demo codes]<br />
<br />
===Datasheet===<br />
*[http://{{SERVERNAME}}/w/images/e/e6/2.13inch_e-Paper_Datasheet.pdf 2.13inch e-Paper Datasheet]<br />
<!-- ===开发资料=== --><br />
==FAQ==<br />
{{E-Paper FAQ}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:GMS_GPRS_GNSS_HAT_Manual&diff=354Template:GMS GPRS GNSS HAT Manual2020-07-11T03:30:42Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>=Test it in Windows PC=<br />
==Hardware connection==<br />
This module comes with a power adapter, micro USB cable, GSM antenna, GPS<br />
antenna and Bluetooth antenna. Besides these you should prepare two more things:<br /><br />
#A SIM card, the card should be usable and GPRS access (for testing the GPRS)<br />
#An earphone with a microphone on it (For testing Call function)<br />
*Insert the SIM card to the card slot, plug the earphone and connect the GSM antenna<br /><br />
*Install CP2102 driver, plug the jumper B, and connect the USB to UART interface of GSM/GPRS/GNSS HAT to PC with a micro USB cable. Then the PWR indicator will keep bright.<br /><br />
*Open Device Manager to get the corresponding COM port number of CP2102. For example, it is COM7 as below. Users need to choose the correct port according to the Manager. <br /><br />
[[file:GSM-GNSS-GPRS_COM.png|center|500px]]<br />
*Press the PWRKEY button and hold for 1s, the NET indicator will blink as below.<br /><br />
: Generally, the NET indicator will fast flash firstly (1 time per second), which means that the module has not logged in the Network. After logging in, the indicator become to flash slowly (1 time every three seconds). Up to the local GSM network, this process that logging in will last several seconds to dozens of seconds.<br /><br />
If you take too much time to log in and failed, please check that whether the GSM antenna is connected correctly, and whether the SIM card is usable and inserted correctly.<br /><br />
Set the jumper to A<br /><br />
:[[file:GSM-GPRS-GNSS HAT-1.png|500px]]<br />
<br />
==Test GSM==<br />
<font color="#FF0000"><br />
For more details of AT commands, please refer to: SIM800 Series_AT Command Manual_V1.10<br /><br />
</font><br />
===Take calls===<br />
#Insert the SIM card, connect the GSM antenna and TLL serial wires correctly. Then power on the board;<br />
#Check whether the indicators blink correctly (PWR and STA keep bright, NET flashes every three seconds).<br />
# Send “AT+CPIN?” and Enter to query the status of the SIM card. Getting “+CPIN: READY” if the SIM card is ready<br />
#Call number: for example, “ATD10086;” (10086 is the number of China Mobile Communications Corporation)<br />
#Send “ATH” and Enter to hang up the call, as below:<br />
[[file:GSM-GNSS-GPRS_Callphone.png|center|500px]]<br />
<br />
===Answer calls===<br />
#Enable CLIP notification: AT+CLIP=1 then Enter<br />
#Hang up: ATH then Enter <br />
[[file:GSM-GNSS-GPRS_answercall.png|center|500px]]<br />
<br />
===Send SMS===<br />
#Set the local SMSC:AT+CSCA="+8613800755500" then Enter, get response “OK”. Note: The SMSC will be different in different areas. Here, it is ShenzhenChina as examples;<br />
#AT+CMGF=1: Set SMS to TEXT mode;<br />
#AT+CMGS="xxxxxxxxxxx” then Enter, set the number of receivers, then you will get a response: >, edit the content of the message (needn’t Enter at the end). After editing, GSM/GPRS/GNSS HAT User Manual send 1A in HEX format to send the message (0x1A is key value of “CTRL+Z”, it will tell the module to send). If the message is sent successfully, the module will get the reply +CNGS: 174 as below figures<br />
[[file:GSM-GNSS-GPRS_sendMessage.png|center|500px]]<br />
<br />
===Receiver SMS==<br />
#Send a message “this is a receive test” to the GSM/GPRS/GSNN HAT from your phone<br />
#. While receiving messages, the module will report it to UART: “SM”, 3, it means that there are 3 messages in SM, and the message we receive just now is the third message.<br />
#Reading messages:AT+CMGR=3 to read the third message (AT+CMGL="ALL" to read all messages)<br />
#Deleting message:AT+CMGD=3, to delete the message as below<br />
[[file:GSM-GNSS-GPRS_revMessage.png|center|500px]]<br />
<br />
==Test GPS==<br />
<font color="#FF0000"><br />
For more details of AT commands, please refer to:SIM868 Series GNSS Application Note V1.00<br /><br />
</font><br />
#Connecting the GPS antenna, and place the receiver on open area to receive GPS signal<br />
#Turn on power of GNSS: AT+CGNSPWR=1<br />
#Check the baud rate: AT+CGNSIPR?<br />
#Start to sending data received to UART: AT+CGNSTST=1:<br />
[[file:GSM-GNSS-GPRS_GPS.png|center|900px]]<br />
*Close the Com Assistant software SSCOM. Open u-center and set the Port and Baudrate. The Port is the port number recognized by PC. Set Baudrate as the value we got before (You can configure in Receiver option or click icons on the toolbar directly):<br /><br />
[[file:GSM-GNSS-GPRS_GPS_u-center.png|center|900px]]<br /><br />
*Click Connect, then the GNSS information will be printed as below<br /><br />
[[file:GSM-GNSS-GPRS_GPS_u-center2.png|center|900px]]<br /><br />
<br />
==Test GPRS==<br />
<font color="#FF0000"><br />
For more details of AT commands, please refer to:SIM800 Series_AT Command Manual_V1.10<br /><br />
</font><br />
===Seyying local virtual server===<br />
The virtual server defines the mapping between service ports of WAN and web servers of LAN. All requests from the Internet to service ports of WAN will be redirected to the computer (web servers of LAN) specified by the server IP. (Please refer to guide manual of your router)<br /><br />
#Log in Management Console of your router with a browser (read your router’s guide manual for specific address)<br />
#. Set Port:5000 (The Port can’t conflict with others. Here we set it to 5000)<br />
#Set LAN IP address for your computer (you can run CMD on your computer, and execute command ipconfig to inquiry the address of IPv4), 192.168.1.14 as examples<br />
[[file:GSM-GNSS-GPRS_gnss_ip.png|center|900px]]<br /><br />
===Get WAN IP===<br />
You can search “IP” on a browser to get WAN IP address of your PC as below: (This method is only workable in China)<br /><br />
[[file:GSM-GNSS-GPRS_gnss_ip2.png|center|900px]]<br /><br />
===Set GPRS===<br />
#AT+CSQ inquiry the quality of the signal. The first parameter of response is the signal quality (Max is 31). The signal is stronger, the value bigger.<br />
#AT+CREG? Check Network registration. If the second parameter of response is 1 or 5, it means that the Network has been registered successfully<br />
#AT+CGATT? AT+CGATT? Check the state of GPRS attachment<br />
#AT+CSTT="CMNET" Set the Network according to the actual situation. Here we use CMNET<br />
#AT+CIICR Bring up a wireless connection with GPRS<br />
#AT+CIFSR Get the local IP address<br />
#AT+CIPSTART="TCP","113.81.232.4",5000 Establish TCP/IP connection<br />
===Send data===<br />
#AT+CIPSEND module is going to send data to the server<br />
#After getting the response >, edit the contents of the message (has been converted) without Enter at the end. Then send 1A in HEX format as below<br />
#If the data sent successfully, the server will receive the data<br />
[[file:GSM-GNSS-GPRS_gnss_sendmsg.png|center|900px]]<br /><br />
===Receive data===<br />
#Choose the IP address of module on Peers input box<br />
#Input the data which you want to send: hello, I am a server, please receive my message<br />
#Click Send button, you can see that module receive the data <br />
[[file:GSM-GNSS-GPRS_gnss_revmsg.png|center|900px]]<br /><br />
===Deactivate connection===<br />
#Send AT+CIPCLOSE or AT+CIPSHUT to deactivate the connection.<br />
==Test Bluetooth==<br />
<font color="#FF0000"><br />
For more information about AT command: Please refer to: SIM800 series_BT_application_V1.04 <br /><br />
</font><br />
===Setting===<br />
#Connecting the Bluetooth antenna to the GSM/GPRS/GNSS HAT. Open the Bluetooth service of your phone and set it visible to all nearby Bluetooth.<br />
#AT+BTPOWER=1 Turn on Bluetooth<br />
#AT+BTHOST?,Enquiry the name and MAC address of the module, you can also use <br />
#AT+BTSCAN=1,10 ,To search available nearby devices. The search time is 10s. During searching, the module will print the information of the available devices to UART. Examples: +BTSCAN: 0,2,"H60-L01",50:a7:2b:bb:a4:50,-47, “0,2” is the ID of this device;“H60-L01” is name of device; “50:a7:2b:bb:a4:50” is MAC address of device;“-47” is the RSSI value.<br />
#AT+BTPAIR=0,2, Pair with an available device, the second parameter here is the ID we got at step 4. If you get the response Error, just use AT+BTUNPAIR to delete the pairing data and pair again.<br />
#After sending the pair command successfully, you can see that your telephone prompt the pairing request. Then you need to click Pair to accept the request and send AT+BTPAIR on PC to confirm the pairing behavior. With these, module pair with the telephone successfully. If you don’t send the AT command to confirm pairing, the telephone will prompt information that fails to pair after a while. In this case, you need to send the pair command again. You can also use the telephone to send the pairing request, then input AT+BTPAIR=1,1 to confirm it.<br />
[[file:GSM-GNSS-GPRS_bt_config.png|center|900px]]<br /><br />
===Connecting===<br />
*To test Bluetooth of GSM/GPRS/GNSS, you should use the Bluetooth APP. Scanning the QR code below to download the APP, then you can use its Serial function to test. (The APP is just used for simply testing)<br />
<br />
#Open the APP, click the SCAN button on the upper right to scan the available devices. Then choose “SIM868” (“SIM868” is default Bluetooth name of GSM/GPRS/GNSS HAT) and click UART. Then you will get the information that +BTCONNECTING on the COM assistant, which means there is a connecting request. If you don’t reply to it for a while, the APP will prompt that connecting failed. And failed information “+BTDISCONN” will be printed on PC<br />
#Connecting again, send command AT+BTACPT=1 to confirm and accept Bluetooth connection. You can see that +BRCONNECT is printed on PC shows that succeed in SPP connecting. Then you can send data to the module with the APP.<br />
#While receiving the data send from the telephone, the data will be printed with ID of the device, the length of string, and the content on PC.<br />
#Send AT+BTSPPSEND command to transmit data. After getting the response >, input the content without Enter at the end. Send 1A in HEX to begin to transmit the data. Then you can see that the data are received by your phone<br />
<br />
=Workin with Raspberry Pi=<br />
==Enable serial port==<br />
*Open a terminal and configure interface by the following commands<br />
<pre><br />
sudo raspi-config<br />
</pre><br />
*Choose Interfacing Options -> Serial->No->Yes<br />
*Restart Raspberry Pi<br />
<pre><br />
sudo reboot<br />
</pre><br />
==Install libtaties==<br />
*Install Python libraries<br />
<pre><br />
sudo apt-get update<br />
sudo pip install RPi.GPIO<br />
sudo apt-get install python-serial<br />
</pre><br />
<br />
==minicom test==<br />
*Install minicom tool and test<br />
<pre><br />
sudo apt-get install minicom<br />
# For Pi 3B\3B+\4B,<br />
sudo minicom -D /dev/ttyS0 -b 9600<br />
# For Pi ZERO\2B<br />
sudo minicom -D /dev/ttyAMA0 -b 9600<br />
# If you want to test with the USB port of Pi, you can change the jumper to A:<br />
sudo minicom -D /dev/ttyUSB0 -b 9600<br />
</pre><br />
The default baud rate of minicom is 115200,If you want to change it to 9600, you can add parameter to the command: -b 9600. ttyS0 is the serial port of Pi 3B/3B+, ttyAMA0 of Pi 2B/Zero. If you use USB interface, the port may be ttyUSB*<br><br />
Here we test Bluetooth as example:<br><br />
[[file:GSM-GNSS-GPRS_rpi_minicom.png|center|900px]]<br><br />
<br />
==Demo codes==<br />
*Download<br />
<pre><br />
sudo apt-get install p7zip<br />
wget http://{{SERVERNAME}}/w/images/1/1f/GSM-GPRS-GNSS-HAT-Code.7z<br />
7zr x GSM-GPRS-GNSS-HAT-Code.7z -r -o./GSM-GPRS-GNSS-HAT-Code<br />
sudo chmod 777 -R GSM-GPRS-GNSS-HAT-Code<br />
cd GSM-GPRS-GNSS-HAT-Code/GSM-GPRS-GNSS-HAT-Code/Raspberry\ Pi/<br />
</pre><br />
<br />
*We provide some python codes for testing<br />
<pre><br />
sudo python call_phone.py <br />
sudo python send_message.py <br />
sudo python gps.py<br />
</pre><br />
<br />
=Resources=<br />
==Examples==<br />
*[http://{{SERVERNAME}}/w/images/1/1f/GSM-GPRS-GNSS-HAT-Code.7z Demo codes]<br />
==Software==<br />
*[http://{{SERVERNAME}}/w/images/8/88/TCP232.7z TCP232 Software]<br />
*[http://{{SERVERNAME}}/w/images/c/c1/Chiness_Unicode.zip Fonts convertor]<br />
*[http://{{SERVERNAME}}/w/images/3/31/U-center_v8.12.7z U-center]<br />
*[http://{{SERVERNAME}}/w/images/d/d5/SSCOM.rar SSCOM Software]<br />
==Documents==<br />
*[http://{{SERVERNAME}}/w/images/2/20/GSM-GPRS-GNSS-HAT-Schematic_.pdf Schematic]<br />
*[http://{{SERVERNAME}}/w/images/6/6f/SIM868_Reference_Design_V1.01%28160310%29.pdf SIM868_Reference Design V1.01(160310).pdf]<br />
*[http://{{SERVERNAME}}/w/images/f/fe/SIM868_NMEA_Message_Specification_V1.00.pdf SIM868 NMEA Message Specification V1.00.pdf]<br />
*[http://{{SERVERNAME}}/w/images/2/20/SIM800_Series_AT_Command_Manual_V1.09.pdf SIM800 Series AT Command Manual V1.09.pdf]<br />
*[http://{{SERVERNAME}}/w/images/3/3d/SIM868_GNSS_Application_Note_V1.00.pdf SIM868 GNSS Application Note V1.00.pdf]<br />
*[http://{{SERVERNAME}}/w/images/b/b6/SIM868_GNSS_AGPS_Application.pdf SIM868 GNSS AGPS Application.pdf]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Template:SIM7600CE-4G-HAT_Manual&diff=353Template:SIM7600CE-4G-HAT Manual2020-07-11T03:30:40Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>== Testing ==<br />
=== Hardware setting ===<br />
*This module comes with GSM antenna, LTE antenna and micro USB cable. Besides these you should prepare:<br />
**A 4G sim card<br />
**A microphone cable<br />
**A Micro SD card (Optional)<br />
*Insert the SIM card to the card slot, Insert the headphone cable and connect the LTE antenna.<br /><br />
<div><ul> <br />
<li style="display: inline-block;"> [[File:SIM7600X 4G HAT (5).png|thumb|none|400px|back side]] </li><br />
<li style="display: inline-block;"> [[File:SIM7600X 4G HAT (7).jpg|thumb|none|400px|front size]] </li><br />
</ul><br />
</div><br />
*Connect the USB interface of SIM7600E-H 4G HAT to PC with a micro USB cable. Then the PWR indicator will keep bright.<br />
*Press the PWRKEY button and hold for 1s, the NET indicator will blink 1 time per second.<br />
*Open Device Manager to check the COM ports<br />[[File:Sim7600x-4G-HAT-wiki-1.jpg|600px]]<br />
*Install SIM7600 driver([http://www.waveshare.net/w/upload/e/e6/SIM7600-Driver.7z driver])<br />
<font color="red">'''【Note】The default hardware of SIM7600CE 4G HAT needs to be turned on by button. If the hardware needs to be turned on automatically, you can use a connection line to connect the PWR and GND pins on the module pin, so that it can automatically turn on, as shown in the figure below'''</font><br /><br />
[[File:SIM7600X 4G HAT (3).png|600px]]<br />
== Testing it with AT commands ==<br />
=== General AT commands ===<br />
<br />[[File:Sim7600x-4G-HAT-wiki-3.jpg|thumb|680px]]<br /><br />
{| class="wikitable"<br />
|-<br />
! Command !! Description !! Return<br />
|-<br />
| AT || AT test command || OK<br />
|-<br />
| ATE || ATE1: Enable echo<br /> ATE0: Disable echo|| OK<br />
|-<br />
| AT+CGMI || Module manufacturers|| OK<br />
|-<br />
| AT+CGMM || Module model || OK<br />
|-<br />
| AT+CGSN || Serial number || OK<br />
|-<br />
| AT+CSUB || Module revision || OK<br />
|-<br />
| AT+CGMR || Firmware revision || OK<br />
|-<br />
| AT+IPREX || Set baud rate || +IPREX:<br />OK<br />
|-<br />
| AT+CRESET || Reset module || OK<br />
|-<br />
| AT+CSQ || Check signal quality || +CSQ: 17,99<br />OK<br />
|-<br />
| AT+CPIN? || SIM Card Status || +CPIN: READY<br />
|-<br />
| AT+COPS? || Operator selection || +COPS:<br />OK<br />
|-<br />
| AT+CREG? || Network registration || +CREG:<br />OK<br />
|-<br />
| AT+CPSI? || UE system infor || <br />
|-<br />
|AT+CNMP || Mode selection:<br />2:Automatic<br />13:GSM only<br />38:LTE only<br />48 : Any modes but LTE<br />... .... || OK<br />
|}<br />
<font color="red">For more details, please refer to the documentation: SIM7500_SIM7600 Series_AT Command Manual_V1.07 </font><br />
<div class="sep0px"></div><br />
=== '''Raspberry Pi use 4G''' ===<br />
*Insert the module to 40PIN GPIO of Raspberry Pi, connect the USB interface of 4G module to USB port of Pi, and start it.:<br />
[[File:SIM7600X 4G HAT (7).jpg|600px|Hardware connection]]<br />
*Initialize Raspberry Pi according to [[#Initailize Raspberry Pi | Initialize Raspberry Pi]]<br />
*Refer to the guide below for networking. (Recommend you use USB port for faster speed):<br />
**[[#Networking via wwan0 Interface]]<br /><br />
*If the network work abnormally, please check set the DNS by commands below for a try:<br />
route add -net 0.0.0.0 ppp0<br />
<br />
== Test GPS ==<br />
*Connecting the GPS antenna, and place the receiver on open area outdoor<br />
*AT Commands used<br />
AT+CGPS=1 //Enable GPS<br />
AT+CGPSINFO //Print GPS information to serial port<br />
AT+CGPS=0 //Disable GPS<br />
[[File:Sim7600x-4G-HAT-wiki-7.jpg|600px]]<br />
<br />
== TCP/IP Connection ==<br />
<font color="red">Please make sure that your SIM card supports GPRS services.</font><br /> <br />
#Assemble the SIM card, connect all the antenna, and connect the module to PC by USB cable.<br />
#Press the PWR button to power on the module and wait for a dozen seconds. <br />
#Mkae sure that all the indicator light normally.<br />
=== Set the local virtual servers settings ===<br />
Virtual servers define the mapping between service ports of WAN and web servers of LAN. All requests from the Internet to service ports of WAN will be redirected to the computer (webservers of LAN) specified by the server IP. (see your router’s guide manual))<br /><br />
#Log in Management Console of your router with a browser (read your router’s guide manual for specific address)<br />
#Set Port::2317(The Port can’t conflict to others. Here we set2317)<br />
#Set LAN IP address of your computer (you can run CMD on your computer, and execute commands config to inquiry the address of IPv4), 192.168.1.168 as examples<br /><br />
=== Get WAN IP ===<br />
You can search “IP” on the browser to get your WAN IP address<br /><br />
[[File:Sim7600x-4G-HAT-wiki-8.jpg|1000px]]<br />
=== Set GPRS ===<br />
AT+CGDCONT=1,"IP","CMNET" //Set APN<br />
AT+CSQ //Check the quality of the signal, bigger the value, stronger the signal.<br />
AT+CREG? //GPRS network status<br />
AT+CIPMODE=1 //TCP/IP mode<br />
AT+CSOCKSETPN=1 //PDP profile number<br />
AT+CIPMODE=0 //Choose TCP/IP mode<br />
AT+NETOPEN //Open socket<br />
AT+CIPOPEN=0,"TCP","113.81.233.65",2317 //establish connection<br />
AT+CIPSEND=0,9, //Send data of a specific size<br />
1A //(HEX format) Tell module to send data<br />
AT+CIPCLOSE=0, //close connection<br />
AT+NETCLOSE, //Close socket<br />
<br />
== Test TF card==<br />
1. Plug the SIM card, connect the LTE antenna, and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to power on<br />
<br />
[[File:SIM7600X 4G HAT (5).png|600px]]<br />
<br />
2. User command to use TF card<br />
AT+FSCD=D: //Choose the path of TF card <br />
+FSCD: D:/<br />
OK<br />
AT+FSLS //Check subdirecotry<br />
+FSLS: SUBDIRECTORIES: <br />
overlays<br />
MyDir<br />
System Volume Information<br />
...<br />
...<br />
OK<br />
[[File:Sim7600x-4G-HAT-wiki-9.jpg|880px]]</ br><br />
3. Create file and write data to TF card<br />
Create MyDir folder in the root directory and create tx.txt in the folder, write data test content to the file by the following commands<br /><br />
AT+CFTRANRX="D:/MyDir/t1.txt",12 //file name<br />
>test content //data<br />
OK<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-10.jpg|880px]]<br />
<br />
4. Open file of TF card<br />
AT+CFTRANTX="D:/MyDir/t1.txt"<br />
+CFTRANTX: DATA,012<br />
test content<br />
+CFTRANTX: 0<br />
OK<br />
[[File:Sim7600x-4G-HAT-wiki-11.jpg|800px]]</ br><br />
[[File:Sim7600x-4G-HAT-wiki-12.jpg|800px]]<br />
<br />
For more information about the commands, please refer to SIM7500_SIM7600 Series_AT Command Manual_V1.07 P256~P268<br />
<br />
== Take calls ==<br />
*Connect the hardware and power on the SIM7600X module.<br />
*Commands for taking calls:<br /><br />
{| class="wikitable"<br />
|-<br />
! AT+CNUM || Phone number (Not all SIM cards Support) || +CNUM<br />OK<br />
|-<br />
| AT+CSDVC || AT+CSDVC=1:Handset output<br />AT+CSDVC=3:Speaker output|| OK<br />
|-<br />
| AT+CLVL=? || check volume level || OK<br />
|-<br />
| AT+CLVL=2 || volume level set to 2 || OK<br />
|-<br />
| ATD<phone_number>; || Make calls || OK<br />
|-<br />
| AT+CHUP || Hang up call || OK<br />
|-<br />
| AT+CLIP=1 || Phone ring || OK<br />
|-<br />
| ATA || Answer call|| OK<br />
|}<br />
[[File:Sim7600x-4G-HAT-wiki-13.jpg|600px|Take call]]<br /><br />
<div class="sep0px"></div><br />
<font color="red">【Note】: You need to check "new line" when using SSCOM to test</font><br />
== Send/Receive SMS ==<br />
#Plug the SIM card, connect the LTE antenna and connect the USB interface of SIM7600E-H 4G HAT to PC. Then press the PWRKEY to <br />
#Check whether the indicators blink correctly (PWR’s and NET’s flashes).<br />
#Use commands below to send SMS<br />
{|class="wikitable"<br />
!Comamnd!! Description!! Return<br />
|-<br />
|AT+CMGF=1||select message format||OK<br />
|-<br />
|AT+CSCS="GSM"||Select TE character set: GSM||OK<br />
|-<br />
|AT+CSMP||set text mode para||OK<br />
|-<br />
|AT+CMGS="<phonenumber>"||Send message||OK<br />
|-<br />
|AT+CNMI=2,1||message indications||OK<br />
|-<br />
|AT+CMGR=1||Read message 1||OK<br />
|}<br />
[[File:Sim7600x-4G-HAT-wiki-14.jpg|700px|Send SMS]]<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-15.jpg|680px|Receive SMS]]<br />
<br />
== Working with Raspberry Pi ==<br />
===Hardware connection===<br />
The relationship between SIM7600 control pins and Raspberry Pi IOs is shown in Table:<br />
{| class="wikitable"<br />
|-<br />
! SIM7600X 4G HAT !! Raspberry Pi<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| RXD || TXD (BCM: 14)<br />
|-<br />
| TXD || RXD (BCM: 15)<br />
|-<br />
| PWR || P22 (BCM: P6)<br />
|-<br />
| FLIGHTMODE || P7 (BCM: P4), high active<br />
|}<br />
=== Initialize Raspberry Pi ===<br />
You need to set the SIM7600 module to the working mode first.<br />
*Download demo codes[http://{{SERVERNAME}}/w/images/2/29/SIM7600X-4G-HAT-Demo.7z demo codes],unzip it and recommend the folder Rspberry Pi/c as SIM7600X,and sopy it to /home/pi directory of Raspberry Pi<br />
*Go to /home/pi/SIM7600X directory and run the following command.<br />
chmod 777 sim7600_4G_hat_init<br />
*Set auto-run when booting:<br />
sudo nano /etc/rc.local<br />
*Add the line below in the from of exit 0:<br />
sh /home/pi/SIM7600X/sim7600_4G_hat_init<br />
[[File:Sim7600x-4G-HAT-wiki-19.jpg|600px]]<br />
<br />
=== Enable serial port ===<br />
For proper use, you need to disable the login shell and enable the hardware serial.<br />
sudo raspi-config<br />
Choose Interfacing Options ->Serial ->no -> yes,<br /><br />
<br />
===Networking via wwan0 Interface===<br />
1、Connect the USB interface of SIM7600 module to Rasberry Pi by USB cable<br />
<br />
2、Use ifconfig command to check wwan0 interface.<br />
<br />
3、Install libqmi and udhcpc<br />
sudo apt-get install libqmi-utils udhcpc -y<br />
3、Check the status of wwan0 interface:<br />
sudo qmicli -d /dev/cdc-wdm0 --dms-get-operating-mode<br />
: If the status is not online, you need to run the following command to configure it and test again.<br />
sudo qmicli -d /dev/cdc-wdm0 --dms-set-operating-mode='online'<br />
4、Set wwan0 network<br />
<pre><br />
sudo qmicli -d /dev/cdc-wdm0 -w <br />
sudo ip link set wwan0 down <br />
sudo echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip<br />
sudo ip link set wwan0 up<br />
</pre><br />
<br />
5、 Set APN and connect to network.<br />
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='YOUR_APN',username='YOUR_USERNAME',password='YOUR_PASSWORD',ip-type=4" --client-no-release-cid<br />
:Note: the apn, username, password and other parameters should be modified according to the actual situation.<br />
:The user name of APN can be ignore sometimes. For examples:<br />
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='CMNET',ip-type=4" --client-no-release-cid<br />
<br />
6、User udhcpc to set router and IP<br />
sudo udhcpc -i wwan0<br />
7、Now you can disconnect the RJ45, turn off the WiFi and test the 4G network.<br />
<br />
=== Minicom test ===<br />
1、Connect the SIM7600 module and power on Raspberry Pi<br /><br />
2、Install minicom<br /><br />
sudo apt-get install minicom<br />
3、Use the command minicom -D /dev/ttyS0 for testing<br /><br />
Default baud rate: 115200<br /><br />
If you use Pi2B/zero, the serial port should be ttyAMA0<br /><br />
4、Send commands:<br />
<br />
[[File:Sim7600x-4G-HAT-wiki-20.jpg|680px]]<br />
<br />
=== Demo codes ===<br />
1、Connect the SIM7600 module and power on Raspberry Pi<br /><br />
2、Dwonalod demo codes and copy it to /home/pi/ directory;<br />
wget http://{{SERVERNAME}}/w/images/2/29/SIM7600X-4G-HAT-Demo.7z<br />
sudo apt-get install p7zip-full<br />
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/pi<br />
sudo chmod 777 -R /home/pi/SIM7600X-4G-HAT-Demo<br />
<br />
3、Enter the folder of bcm2835 compile and install BCM2835 libraries:<br />
chmod +x configure && ./configure && sudo make && sudo make install<br />
<br />
4、Enter the examples folder and run the codes as below:<br />
sudo make clean //Clean<br />
sudo make //compile <br />
sudo ./PhoneCall //run the codes<br />
You can also combine the commands:<br /><br />
sudo make clean && sudo make && sudo ./PhoneCall<br />
==== '''PHONECALL example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-21.jpg|600px]]<br />
==== '''SMS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-22.jpg|600px]]<br />
==== '''GPS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-23.jpg|600px]]<br />
===='''TCP example'''====<br />
[[File:Sim7600x-4G-HAT-wiki-24.jpg|600px]]<br />
==== '''FTP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-25.jpg|600px]]<br />
<br />
==Arduino example==<br />
=== Hardware connection ===<br />
Connect the SIM7600 module to UNO PLUS / Arduino UNO:<br />
{| class="wikitable"<br />
|-<br />
! SIM7600X 4G HAT !! UNO PLUS / Arduino UNO<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| TXD || 0 (RX)<br />
|-<br />
| RXD || 1 (TX)<br />
|-<br />
| PWR || 2<br />
|}<br />
=== Install Arduino Libraries ===<br />
Downloaad the demo codes and unzip it<br /><br />
Copy folder Waveshare_SIM7600X_Arduino_Library to libraries folder under the installation directory of Arduino IDE<br /><br />
Open Arduino IDE --> File -->Examples -->Waveshare SIM7600X,and run the examples:<br /><br />
[[File:Sim7600x-4G-HAT-wiki-26.jpg|600px]]<br />
=== Examples ===<br />
==== '''PHONECALL example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-27.jpg|600px]]<br />
==== '''SMS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-28.jpg|600px]]<br />
==== '''GPS example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-29.jpg|600px]]<br />
==== '''TCP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-30.jpg|600px]]<br />
==== '''FTP example''' ====<br />
[[File:Sim7600x-4G-HAT-wiki-31.jpg|600px]]<br />
<br />
==Jetson Nano Examples==<br />
===Hardware connection===<br />
Jetson Nano has the same 40PIN header as Raspberry Pi.<br />
<br />
[[File:SIM7600X 4G HAT (4).png|thumb|300px|connection]]<br />
<br />
{| class="wikitable" style="text-align:center;"<br />
|-<br />
! scope="col" | SIM7600X 4G HAT<br />
! scope="col" | Jetson Nano<br />
|-<br />
| 5V || 5V<br />
|-<br />
| GND || GND<br />
|-<br />
| TXD || 10 (Board)<br />
|-<br />
| RXD || 8 (Board)<br />
|-<br />
| PWR || 31(Board)<br />
|}<br />
<br />
===Jetson Nano minicom test===<br />
1、Connect SIM7600X 4G HAT to Jetson Nano and power on it by pressing the PWRKERY key for 3s.将SIM7600X 4G HAT接入Jetson Nano中,按下PWRKER键三秒后开机<br \><br />
2、Access Jetson nano <br \><br />
3、Open a terminal and install minicom:<br />
sudo apt-get install minicom<br />
3、use the command to test module<br />
sudo minicom -D /dev/ttyTHS1 -b 115200<br />
4、 Send commands:<br \><br />
[[File:Sim7600x-4G-HAT-wiki-32.png|400px]]<br />
<br />
===Python Examples===<br />
Install libraries<br \><br />
sudo apt-get python3-pip<br />
sudo pip3 install pyserial<br />
sudo apt-get install p7zip<br />
Download the demo codes<br />
mkdir -p ~/Documents/SIM7600X_4G_HAT<br />
wget -P ~/Documents/SIM7600X_4G_HAT/ http://{{SERVERNAME}}/w/images/2/29/SIM7600X-4G-HAT-Demo.7z<br />
[[File:Sim7600x-4G-HAT-wiki-33.png|400px]]<br \><br />
Ener the folder of demo codes and unzip it<br />
cd ~/Documents/SIM7600X_4G_HAT/<br />
sudo p7zip --uncompress SIM7600X-4G-HAT-Demo.7z<br />
===='''AT'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the directoryJetson Nano/AT:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/AT/<br />
sudo python3 AT.py<br />
[[File:Sim7600x-4G-HAT-wiki-34.png|400px]]<br />
===='''GPS'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the directory Jetson Nano/GPS:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/GPS/<br />
sudo python3 GPS.py<br />
[[File:Sim7600x-4G-HAT-wiki-35.png|400px]]<br />
===='''PhoneCall'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br />
Enter the direcoryJetson Nano/PhoneCall:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/PhoneCall/<br />
sudo python3 PhoneCall.py<br />
:Note: You need to modify the number by modify the codes.<br />
[[File:Sim7600x-4G-HAT-wiki-36.png|400px]]<br />
===='''SMS'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br><br \><br />
Enter the directory Jetson Nano/SMS:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/SMS/<br />
sudo python3 SMS.py<br />
:Note: You need to change the phone number by modify the codes<br />
[[File:Sim7600x-4G-HAT-wiki-37.png|400px]]<br />
===='''TCP'''====<br />
Connect the SIM7600X_4G_HAT to Jetson Nano.</ br>。<br \><br />
Enter the directory Jetson Nano/TCP:<br />
cd ~/Documents/SIM7600X_4G_HAT/Jetson\ nano/TCP/<br />
sudo python3 TCP.py<br />
:Note: you need to modify the address to the actual one.<br />
[[File:Sim7600x-4G-HAT-wiki-38.png|400px]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=E-paper_for_Jetsonnano_Use&diff=352E-paper for Jetsonnano Use2020-07-11T03:16:19Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>Jetson nano use software SPI, whose speed will be slow than hardware spi.<br /><br />
=Hardware connection=<br />
Because the 40 PIN of Jetson Nano is compatible with Raspberry Pi, and the Jetson.GPIO library is compatible with RPi. GPIO as well, the connection of Jetson nano is the same as Raspberry Pi.<br />
{|border=1; style="width:700px;" align="center"<br />
|+Connect to Jetson Nano Developer Kit<br />
|- style="background:Black; color:white" align="center"<br />
|rowspan="2"|e-Paper<br />
| colspan="2" | Jetson Nano Developer Kit<br />
|- style="background:Black; color:white" align="center"<br />
|BCM2835<br />
|Board<br />
|- align="center"<br />
|VCC||3.3V||3.3V<br />
|- align="center"<br />
|GND||GND||GND<br />
|-align="center"<br />
|DIN||10(SPI0_MOSI)||19<br />
|-align="center"<br />
|CLK||11(SPI0_SCK||23<br />
|-align="center"<br />
|CS||8(SPI0_CS0)||24<br />
|-align="center"<br />
|DC||25||22<br />
|-align="center"<br />
|RST||17||11<br />
|-align="center"<br />
|BUSY||24||18<br />
|}<br />
<br />
=Software settings=<br />
===Install libraries===<br />
*Open a terminal and run the following commands to install libraries<br /><br />
<pre><br />
sudo apt-get update<br />
sudo apt-get install python3-pip<br />
sudo pip3 install Jetson.GPIO<br />
sudo groupadd -f -r gpio<br />
sudo usermod -a -G gpio your_user_name<br />
sudo cp /opt/nvidia/jetson-gpio/etc/99-gpio.rules /etc/udev/rules.d/<br />
sudo udevadm control --reload-rules && sudo udevadm trigger<br />
</pre><br />
【Note】your_user_name is the username, for example: waveshare<br /><br />
*Install I2C library<br /><br />
<pre><br />
sudo apt-get install python-smbus<br />
</pre><br />
*Install PIL library:<br /><br />
<pre><br />
sudo apt-get install python3-pil<br />
sudo apt-get install python3-numpy<br />
</pre><br />
<br />
=Download the demo codes=<br />
Open a terminal and run the following commands<br /><br />
<pre><br />
sudo apt-get install p7zip-full<br />
sudo wget http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z<br />
7za X E-Paper.7z<br />
cd e-Paper/RaspberryPi\&JetsonNano/<br />
</pre><br />
<br />
=Run examples=<br />
Please first go to the directory of RaspberryPi&JetsonNano and then run the following commands; another wilse the codes cannot be run properly<br /><br />
==C==<br />
*Modify main.c file for certain e-Paper type.<br />
<pre><br />
cd c<br />
sudo nano examples/main.c <br />
</pre><br />
For example, if you have 2.13inch e-paper, you should remove the "//" symbol in the front of line EPD_2IN13_V2(), then save it.<br /><br />
<br />
*Re-compile the codes<br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
==python==<br />
*Enter python directory, and run command ls -al<br /><br />
<pre><br />
cd python/examples<br />
ls -al<br />
</pre><br />
<br />
*Run the script according to the type of e-paper, for example, run the codes of 2.13inch e-Paper<br /><br />
<pre><br />
# python2<br />
sudo python2.7 epd_2in13_V2_test.py<br />
# python3<br />
sudo python3 epd_2in13_V2_test.py<br />
</pre><br />
<br />
=Codes Drscription=<br />
{{e-paper_for_rpi_and_jetsonano_code_description}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=E-paper_for_RPi_Use&diff=351E-paper for RPi Use2020-07-11T03:15:52Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>=Working with Raspberry Pi=<br />
==Hardware connection==<br />
If the e-Paper has 40PIN harder, you can directly attach it on the 40PIN gpio of Raspberry Pi. If the e-Paper only has 8PIN connector, you can write it to Raspberry Pi according to the table below.<br /><br />
{|border=1; style="width:700px;" align="center"<br />
|+Connect to Raspberry Pi<br />
|- style="background:#228B22; color:white" align="center"<br />
|rowspan="2"|e-Paper<br />
| colspan="2" | Raspberry Pi<br />
|- style="background:#228B22; color:white" align="center"<br />
|BCM2835<br />
|Board<br />
|- align="center"<br />
|VCC||3.3V||3.3V<br />
|- align="center"<br />
|GND||GND||GND<br />
|-align="center"<br />
|DIN||MOSI||19<br />
|-align="center"<br />
|CLK||SCLK||23<br />
|-align="center"<br />
|CS||CE0||24<br />
|-align="center"<br />
|DC||25||22<br />
|-align="center"<br />
|RST||17||11<br />
|-align="center"<br />
|BUSY||24||18<br />
|}<br />
<br />
==Enable SPI interface==<br />
The e-Paper use the SPI interface for communicating, you need to enable the SPI interface firstly for proper use.<br />
*打开终端,输入指令进入raspi-config设置界面<br />
sudo raspi-config<br />
*Interfacing Options -> SPI -> Yes<br />
<br />
==Install libraries==<br />
*Install BCM2835, open a terminal and run the following commands:<br />
<pre><br />
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz<br />
tar zxvf bcm2835-1.60.tar.gz <br />
cd bcm2835-1.60/<br />
sudo ./configure<br />
sudo make<br />
sudo make check<br />
sudo make install<br />
</pre><br />
*Install wirignPi<br />
<pre><br />
sudo apt-get install wiringpi<br />
wget https://project-downloads.drogon.net/wiringpi-latest.deb<br />
sudo dpkg -i wiringpi-latest.deb<br />
gpio -v<br />
</pre><br />
*Install Python libraries<br />
<pre><br />
#python2<br />
sudo apt-get update<br />
sudo apt-get install python-pip<br />
sudo apt-get install python-pil<br />
sudo apt-get install python-numpy<br />
sudo pip install RPi.GPIO<br />
sudo pip install spidev<br />
#python3<br />
sudo apt-get update<br />
sudo apt-get install python3-pip<br />
sudo apt-get install python3-pil<br />
sudo apt-get install python3-numpy<br />
sudo pip3 install RPi.GPIO<br />
sudo pip3 install spidev<br />
</pre><br />
<br />
==Download demo codes==<br />
Open a terminal and run the following commands:<br /><br />
<pre><br />
sudo apt-get install p7zip-full<br />
sudo wget http://{{SERVERNAME}}/w/images/5/50/E-Paper.7z<br />
7za X E-Paper.7z<br />
cd e-Paper/RaspberryPi\&JetsonNano/<br />
</pre><br />
<br />
==Run the codes==<br />
You need to go to the directory of RaspberryPi&JetsonNano and then run the command, otherwise, files are not exist.<br /><br />
;C <br />
*Modify the main.c file for certain type (e-Paper)<br />
<pre><br />
cd c<br />
sudo nano examples/main.c <br />
</pre><br />
For example: if the e-Paper you use is the 2.13inch e-Paper, you should remove the // symbol before the line EPD_2IN13_V2_test(). Then press Ctrl+X, then Y and Enter to save the file.<br /><br />
<br />
*Compile the codes<br /><br />
<pre><br />
make clean<br />
make<br />
sudo ./epd<br />
</pre><br />
<br />
;python <br />
*Enter python directory, and run the command ls -al,<br /><br />
<pre><br />
cd python/examples<br />
ls -al<br />
</pre><br />
*Run the commands according to the type of e-Pper. For example, if you want to drive the 2.13inch e-Paper<br /><br />
<pre><br />
# python2<br />
sudo python2.7 epd_2in13_V2_test.py<br />
# python3<br />
sudo python3 epd_2in13_V2_test.py<br />
</pre><br />
<br />
==API Description==<br />
{{e-paper_for_rpi_and_jetsonano_code_description}}</div>INKU-admin123http://www.ingcool.com/w/index.php?title=ETH/USB_HUB_HAT&diff=350ETH/USB HUB HAT2020-07-11T03:15:32Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>==Introduction==<br />
Ethernet / USB HUB HAT for Raspberry Pi, 1x RJ45 Ethernet Port, 3x USB Ports <br />
[[File:ETHUSB HUB HAT wiki-1.jpg|center|500px]]<br />
<br />
==Features==<br />
*3x USB ports, compatible with USB2.0/1.1<br />
*1x RJ45 10/100M port, based on the RTL8152B Ethernet chip<br />
*Onboard multi indicators, for monitoring the status of power, Ethernet, and each USB port<br />
*Operating voltage:5V<br />
==User guide==<br />
{{ETH-USB-HUB-HAT-manual}}<br />
==Resources==<br />
*[http://{{SERVERNAME}}/w/images/0/08/ETH_USB_HUB_HAT.pdf Schematic]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=IMX219-160_Camera&diff=349IMX219-160 Camera2020-07-11T03:02:58Z<p>INKU-admin123: Text replacement - "47.107.148.244" to "{{SERVERNAME}}"</p>
<hr />
<div>==Introduction==<br />
IMX219 Camera, 800 megapixels and 160 FOV. Compatible with Jetson nano. You can also use it with CM3/CM3+ expansion boards like Raspberry Pi Compute Module IO board, Compute Module IO Board Plus, Compute Module POE Board board.<br />
<br />
==Specifications==<br />
*Sensor: Sony IMX219<br />
**Resolution: 3280x2464<br />
**8 Megapixels<br />
*Lens specifications:<br />
**CMOS size: 1/4inch<br />
**Aperture (F): 2.35<br />
**Focal Length: 3.15mm<br />
**Angle of View (diagonal): 160 degree<br />
**Distortion: <14.3%<br />
*4 screw holes<br />
**Used for attachment<br />
**Provides 3.3V power output<br />
==User Guide==<br />
===Hardware connection===<br />
*Connect the camera to CSI interface of Jetson Nano.Set the metal side of FFC into Heat-sink<br />
*:If you have B01 version Jetson Nano Developer Kit, connect one of the CSI interfaces.<br />
*Power on Jetson Nano<br />
*:Note that jetson Nano cannot support hot-plug, you need to restart it after connecting camera.<br />
===Test===<br />
*Open a terminal and run the following command for testing<br />
*:Note: you need to connect a HDMI display to Jetson Nano Developer Kit, otherwise the image of camera cannot be previewed.<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
*If you find that the image captured is red. You can try to download .isp file and installed:<br />
<pre><br />
wget http://{{SERVERNAME}}/w/images/e/eb/Camera_overrides.tar.gz<br />
tar zxvf Camera_overrides.tar.gz <br />
sudo cp camera_overrides.isp /var/nvidia/nvcam/settings/<br />
sudo chmod 664 /var/nvidia/nvcam/settings/camera_overrides.isp<br />
sudo chown root:root /var/nvidia/nvcam/settings/camera_overrides.isp<br />
</pre><br />
【Note】The 12 in NV12 is number but not string.<br />
==Drive two cameras==<br />
If you want to use two camera at the same time(for B01), you can add parameter sensor-id=x to change the camera<br />
*Test video0<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
*Test video1<br />
<pre><br />
DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)20/1' ! nvoverlaysink -e<br />
</pre><br />
==Related link==<br />
*[https://developer.nvidia.com/embedded/downloads Jetson Download center]<br />
*[https://www.jetsonhacks.com/2019/04/02/jetson-nano-raspberry-pi-camera/ Use Opencv]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Main_Page&diff=348Main Page2020-06-22T08:02:16Z<p>INKU-admin123: </p>
<hr />
<div>__NOTOC__<br />
<div id="display"><br />
='''Displays'''=<br />
=='''LCD'''==<br />
*[[7DP-CAPLCD]]<br />
*[[7IP-CAPLCD]]<br />
<br />
=='''e-Paper'''==<br />
*[[2.13inch e-Paper HAT]]<br />
*[[2.9inch e-Paper Module]]<br />
*[[4.2inch e-Paper Module]]<br />
</div><br />
<div id="Communication"><br />
='''Communication'''=<br />
=='''Wireless Communication'''==<br />
*[[GSM/GPRS/GNSS HAT]]<br />
*[[SIM7600A-H 4G HAT]]<br />
*[[SIM7600E-H 4G HAT]]<br />
=='''Wired Communication'''==<br />
*[[ETH/USB HUB HAT]]<br />
</div><br />
<div id="Camera"><br />
<br />
='''Camera'''=<br />
=='''MIPI-CSI Camera'''==<br />
*[[IMX219-160 Camera]]<br />
</div><br />
='''Others'''=<br />
*[[RPi Relay Board]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Main_Page&diff=347Main Page2020-06-22T08:01:33Z<p>INKU-admin123: /* Wired Communication */</p>
<hr />
<div>__NOTOC__<br />
<div id="display"><br />
='''Displays'''=<br />
=='''LCD'''==<br />
*[[7DP-CAPLCD]]<br />
*[[7IP-CAPLCD]]<br />
<br />
=='''e-Paper'''==<br />
*[[2.13inch e-Paper HAT]]<br />
*[[2.9inch e-Paper Module]]<br />
*[[4.2inch e-Paper Module]]<br />
</div><br />
<div id="Communication"><br />
='''Communication'''=<br />
=='''Wireless Communication'''==<br />
*[[GSM/GPRS/GNSS HAT]]<br />
*[[SIM7600A-H 4G HAT]]<br />
*[[SIM7600E-H 4G HAT]]<br />
=='''Wired Communication'''==<br />
*[[ETH/USB HUB HAT]]<br />
</div><br />
<div id="Camera"><br />
<br />
='''Camera'''=<br />
=='''MIPI-CSI Camera'''==<br />
*[[IMX219-160 Camera]]<br />
</div></div>INKU-admin123http://www.ingcool.com/w/index.php?title=RPi_Relay_Board&diff=346RPi Relay Board2020-06-22T08:00:40Z<p>INKU-admin123: Created page with "==Introduction== The RPi Relay Board is a Relay module which is designed for Raspberry Pi, it supports 3 channels controlling. 700px ==Fe..."</p>
<hr />
<div>==Introduction==<br />
The RPi Relay Board is a Relay module which is designed for Raspberry Pi, it supports 3 channels controlling.<br />
[[File:RPi_Relay_Board_1.jpg|center|700px]]<br />
==Features==<br />
*Standard Raspberry Pi 40PIN GPIO extension header, supports Raspberry Pi series boards<br />
* High-quality relays, loads up to 5A 250V AC or 5A 30V DC<br />
*Photo coupling isolation, prevent interference from high voltage circuit<br />
*Onboard LEDs for indicating relays status<br />
*Relay control jumper allows controlling the relays by custom pins other than the default pins<br />
<br />
==User guides==<br />
===Interfaces===<br />
Correspondence between relay channel and RPi Pin<br />
{|border=1; style="width:700px;" align="center"<br />
|-style="background:#0000ff; color:white;" align="center"<br />
|Channel No.||RPiPin No.||wiringPi||BCM||Description<br />
|-align="center"<br />
|CH1||37||P25||26||Channel 1<br />
|-align="center"<br />
|CH2||38||P28||20||Channel 2<br />
|-align="center"<br />
|CH3||40||P29||21||Channel 3<br />
|}<br />
<font color="#FF0000"><br />
Notices: The labels on the PCB are corresponding to the wiringPi code.<br /><br />
</font><br />
<br />
===Relay_JMP (6P jumpeer) ===<br />
Relay_JMP is the relay control pin selecting jumper. When this jumper is connected, the relay can be controlled by the Raspberry Pi.<br /><br />
<br />
===Relay DIP Connector===<br />
This board integrates three screw terminals, and each has three pins for connecting external circuits.<br /><br />
All the terminals are low active. When the Raspberry Pi outputs Low Level from its IO, the LED related to the corresponding channel lights up. At the same time, the relay NO (normally open contacts) close and the NC (normally close contacts) open, so as to change the ON/OFF status of the external circuit.<br /><br />
<br />
===Install libraries===<br />
*Install BCM2835<br />
<pre><br />
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz<br />
tar zxvf bcm2835-1.60.tar.gz <br />
cd bcm2835-1.60/<br />
sudo ./configure<br />
sudo make<br />
sudo make check<br />
sudo make install<br />
</pre><br />
*Install wirignPi<br />
<pre><br />
sudo apt-get install wiringpi<br />
#If you use Pi4, you need to update it:<br />
wget https://project-downloads.drogon.net/wiringpi-latest.deb<br />
sudo dpkg -i wiringpi-latest.deb<br />
gpio -v<br />
</pre><br />
*Install Python libraries<br />
<pre><br />
sudo apt-get update<br />
sudo apt-get install python-pip<br />
sudo apt-get install python-dev<br />
sudo pip install RPi.GPIO<br />
</pre><br />
<br />
===Examples===<br />
Open a terminal and download the demo codes by following commands.<br /><br />
<pre><br />
sudo apt-get install p7zip<br />
wget http://www.ingcool.com/w/images/f/fc/RPi_Relay_Board.7z<br />
7zr x RPi_Relay_Board.7z -r -o./RPi_Relay_Board<br />
sudo chmod 777 -R RPi_Relay_Board<br />
cd RPi_Relay_Board<br />
</pre><br />
<br />
; Shell example<br />
Open a terminal and run the following commands::<br /><br />
<pre><br />
cd shell<br />
sudo ./Relay.sh CH1 ON<br />
sudo ./Relay.sh CH2 ON<br />
sudo ./Relay.sh CH3 OFF<br />
</pre><br />
Expected result: The LED of relay channel 1 is ON, and you can hear the relay closes. The two parameters at the end of this line are configurable. For example, when you change these parameters to CH2 ON, the relay 2 will connect; and then to CH3 OFF, the relay 3 will disconnect.<br /><br />
<br />
; BCM2835 example<br />
Open a terminal and run the following command<br /><br />
<pre><br />
cd bcm2835<br />
make<br />
sudo ./Relay_Module<br />
</pre><br />
Expected result: Three LEDs light up by turns and the relays switch back and forth between the NC node and NO node. In the meantime, the terminal will show the node that the current relay stays at.<br /><br />
<br />
;wiringPi example<br />
Open a terminal and run the following command<br /><br />
<pre><br />
cd wiringPi<br />
make<br />
sudo ./Relay_Module<br />
</pre><br />
Expected result: Three LEDs light up by turns and the relays switch back and forth between the NC node and NO node. In the meantime, the terminal will show the node that the current relay stays at.<br /><br />
<br />
; python example<br />
Open a terminal and run the following command<br /><br />
<pre><br />
cd python<br />
sudo python Relay_Module.py<br />
</pre><br />
Expected result: Three LEDs light up by turns and the relays switch back and forth between the NC node and NO node. In the meantime, the terminal will show the node that the current relay stays at.<br /><br />
<br />
; Webpage controlling<br />
This example is based on the python bottle framerate.<br /><br />
Open a terminal and run the following command:<br /><br />
<pre><br />
sudo apt-get install python-bottle<br />
cd python-bottle<br />
sudo python main.py<br />
</pre><br />
Open a Chrome browser, and go to the IP address of the Raspberry Pi. The port is 8080, for example, 192.168.6.144:8080<br /><br />
[[File:RPi-Realy_Board_python-bottle.png|700px]]<br /><br />
</div><br />
==Resources==<br />
===Document===<br />
*[http://www.ingcool.cn/w/images/d/d7/RPi-Relay-Board-Schematic.pdf Schematic]<br />
==Demo codes==<br />
*[http://www.ingcool.cn/w/images/f/fc/RPi_Relay_Board.7z Demo codes]<br />
==FAQ==<br />
;1、Can I use multiple RPi Relay Board by sticking them?<br />
:*You cannot stack it because of the board is too high, you can think about connecting them by wires.<br />
;2、Why the signal is inverted and the board doesn't work if I set it to High?<br />
:*The really board is toggle by Low level, you need to set it to Low for working.<br />
;3、The relays are open or close by default when it is controlled by webpage?<br />
:*It is the default open</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:RPi-Relay-Board-Schematic.pdf&diff=345File:RPi-Relay-Board-Schematic.pdf2020-06-22T06:51:30Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:RPi-Realy_Board_python-bottle.png&diff=344File:RPi-Realy Board python-bottle.png2020-06-22T06:51:28Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:RPi_Relay_Board_1.jpg&diff=343File:RPi Relay Board 1.jpg2020-06-22T06:51:25Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:RPi_Relay_Board.7z&diff=342File:RPi Relay Board.7z2020-06-22T06:51:22Z<p>INKU-admin123: File uploaded with MsUpload</p>
<hr />
<div>File uploaded with MsUpload</div>INKU-admin123http://www.ingcool.com/w/index.php?title=SIM7600A-H_4G_HAT&diff=341SIM7600A-H 4G HAT2020-06-22T06:25:32Z<p>INKU-admin123: Changed redirect target from SIM7600E-H 4G HAT to SIM7600CE-T/E-H/A-H/G-H 4G Modules</p>
<hr />
<div>#REDIRECT[[SIM7600CE-T/E-H/A-H/G-H 4G Modules]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=Main_Page&diff=340Main Page2020-06-22T06:24:32Z<p>INKU-admin123: </p>
<hr />
<div>__NOTOC__<br />
<div id="display"><br />
='''Displays'''=<br />
=='''LCD'''==<br />
*[[7DP-CAPLCD]]<br />
*[[7IP-CAPLCD]]<br />
<br />
=='''e-Paper'''==<br />
*[[2.13inch e-Paper HAT]]<br />
*[[2.9inch e-Paper Module]]<br />
*[[4.2inch e-Paper Module]]<br />
</div><br />
<div id="Communication"><br />
='''Communication'''=<br />
=='''Wireless Communication'''==<br />
*[[GSM/GPRS/GNSS HAT]]<br />
*[[SIM7600A-H 4G HAT]]<br />
*[[SIM7600E-H 4G HAT]]<br />
=='''Wired Communication'''==<br />
*[[ETH/USB HUB HAT]]<br />
*[[RPi Relay Board]]<br />
</div><br />
<div id="Camera"><br />
='''Camera'''=<br />
=='''MIPI-CSI Camera'''==<br />
*[[IMX219-160 Camera]]<br />
</div></div>INKU-admin123http://www.ingcool.com/w/index.php?title=SIM7600E-H_4G_HAT&diff=339SIM7600E-H 4G HAT2020-06-22T06:21:42Z<p>INKU-admin123: Redirected page to SIM7600CE-T/E-H/A-H/G-H 4G Modules</p>
<hr />
<div>#redirect[[SIM7600CE-T/E-H/A-H/G-H 4G Modules]]<br />
<!--<br />
==Introduction==<br />
The SIM7600X 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer. it is pretty low power consumption.<br />
<br />
You can connect this 4G module with a computer to surf the Internet or attach it onto Raspberry Pi to enable functions like 4G high-speed connection, wireless communication, making telephone calls, sending SMS, global positioning, etc.<br />
==User Guide==<br />
{{SIM7600CE-4G-HAT Manual}}<br />
<br />
==Resources==<br />
===Documents===<br />
*[[File:SIM7600X-4G-HAT-Schematic.pdf]]<br />
*[[File:SIM7600_Series_HSIC_LAN_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7600_Series_Hardware_Design_V1.02.pdf]]<br />
*[[File:SIM7500_SIM7600_SIM7800_Series_SSL_AT_Command_Manual_V1.00.pdf]]<br />
*[[File:SIM7500_SIM7600_SIM7800_Series_HTTP_AT_Command_Manual_V1.00.pdf]]<br />
*[[File:SIM7500_SIM7600_Series_MQTT_ATC_V1.01.pdf]]<br />
*[[File:SIM7500_SIM7600_Series_AT_Command_Manual_V1.08.pdf]]<br />
*[[File:SIM7100_SIM7600M22_Series_TTS_Application_Note_V1.02.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Sleep_Mode_Application_Note_V1.01.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_USB_AUDIO_Application_Note_V1.03.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_UIM_HOT_SWAP_Application_Note_V1.01.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_LBS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_UART_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_TCPIP_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_SMS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_SAT_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_GPS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_GPIO_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Audio_Application_Note_V1.00.pdf]]<br />
*[[File:AN_SMS_V1.01.pdf]]<br />
<br />
===Demo codes===<br />
*[[File:SIM7600-Driver.7z|Driver]]<br />
*[[File:SIM7600X-4G-HAT-Demo.7z|Demo codes]]<br />
===Firmware===<br />
*[[File:SIM7500_SIM7600_QDL_V1.41_Only_for_Update.rar|Softwre update]]<br />
*[[File:LE11B03SIM7600A-H.rar|LE11B13SIM7600M22]]<br />
*[[File:LE11B13SIM7600M22.rar|LE11B13SIM7600M22]]<br />
*[[File:SIM7600_Series_Firmware_Upgrading_User_Guide.pdf|Firmwre upgrade manual]]<br />
<br />
===Software===<br />
*[[File:NetAssist.7z|NetAssist]]<br />
*[[File:SIMCom_GPS_DEMO.7z|SIMCOM_GPS]]<br />
*[[File:SSCOM.rar|SCCOM]]<br />
--></div>INKU-admin123http://www.ingcool.com/w/index.php?title=SIM7600CE-T/E-H/A-H/G-H_4G_Modules&diff=338SIM7600CE-T/E-H/A-H/G-H 4G Modules2020-06-22T06:21:24Z<p>INKU-admin123: Created page with "==Introduction== The SIM7600X 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer. it is pretty lo..."</p>
<hr />
<div>==Introduction==<br />
The SIM7600X 4G HAT is a 4G/3G/2G communication and GNSS positioning module, which supports LTE CAT4 up to 150Mbps for downlink data transfer. it is pretty low power consumption.<br />
<br />
You can connect this 4G module with a computer to surf the Internet or attach it onto Raspberry Pi to enable functions like 4G high-speed connection, wireless communication, making telephone calls, sending SMS, global positioning, etc.<br />
==User Guide==<br />
{{SIM7600CE-4G-HAT Manual}}<br />
<br />
==Resources==<br />
===Documents===<br />
*[[File:SIM7600X-4G-HAT-Schematic.pdf]]<br />
*[[File:SIM7600_Series_HSIC_LAN_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7600_Series_Hardware_Design_V1.02.pdf]]<br />
*[[File:SIM7500_SIM7600_SIM7800_Series_SSL_AT_Command_Manual_V1.00.pdf]]<br />
*[[File:SIM7500_SIM7600_SIM7800_Series_HTTP_AT_Command_Manual_V1.00.pdf]]<br />
*[[File:SIM7500_SIM7600_Series_MQTT_ATC_V1.01.pdf]]<br />
*[[File:SIM7500_SIM7600_Series_AT_Command_Manual_V1.08.pdf]]<br />
*[[File:SIM7100_SIM7600M22_Series_TTS_Application_Note_V1.02.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Sleep_Mode_Application_Note_V1.01.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_USB_AUDIO_Application_Note_V1.03.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_UIM_HOT_SWAP_Application_Note_V1.01.pdf]]<br />
*[[File:SIM7100_SIM7500_SIM7600_Series_LBS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_UART_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_TCPIP_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_SMS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_SAT_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_GPS_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Series_GPIO_Application_Note_V1.00.pdf]]<br />
*[[File:SIM7X00_Audio_Application_Note_V1.00.pdf]]<br />
*[[File:AN_SMS_V1.01.pdf]]<br />
<br />
===Demo codes===<br />
*[[File:SIM7600-Driver.7z|Driver]]<br />
*[[File:SIM7600X-4G-HAT-Demo.7z|Demo codes]]<br />
===Firmware===<br />
*[[File:SIM7500_SIM7600_QDL_V1.41_Only_for_Update.rar|Softwre update]]<br />
*[[File:LE11B03SIM7600A-H.rar|LE11B13SIM7600M22]]<br />
*[[File:LE11B13SIM7600M22.rar|LE11B13SIM7600M22]]<br />
*[[File:SIM7600_Series_Firmware_Upgrading_User_Guide.pdf|Firmwre upgrade manual]]<br />
<br />
===Software===<br />
*[[File:NetAssist.7z|NetAssist]]<br />
*[[File:SIMCom_GPS_DEMO.7z|SIMCOM_GPS]]<br />
*[[File:SSCOM.rar|SCCOM]]</div>INKU-admin123http://www.ingcool.com/w/index.php?title=File:Wiki.png&diff=337File:Wiki.png2020-06-11T02:09:01Z<p>INKU-admin123: INKU-admin123 uploaded a new version of File:Wiki.png</p>
<hr />
<div></div>INKU-admin123