博文

目前显示的是 三月, 2018的博文

Raspberry Pi drive 1.44inch LCD HAT with fbtft

图片
The hardware:

Raspberry Pi 3B 1.44inch LCD HAT The software:
Raspbianfbtft
  Some users feedback that this LCD less of instruction and some of them like to use it as a monitor of Pi. So, this article Let's learn how to port fbtft for displaying with Raspberry Pi.
  Framebuffer uses an buffer to store the data for displaying, if you want to change the display you just need to change the data on buffer.   There is an open source project on github: https://github.com/notro/fbtft. Thanks to its contributors. With this project, Raspberry Pi could supports TFT LCD perfectly. Let's do it. Framebuffer 1. Open and edit module file to enable modules    sudonano /etc/modules    Append two statement below to the file . The first one is to enable the SPI of Pi and the second is used to start the fbtft device.   spi-bcm2835   fbtft_device 2. Creating a new file for fbtft configuration   sudonano /etc/modprobe.d/fbtft.conf    Add the statements to this new file:    # /etc/modprobe.d/fbtft.conf    op…

Some settings for the Raspbian on Raspberry Pi

Note: This blog will keep updating some setting tips when use the Raspbian on raspberry Pi.

Tips 1: on Raspbian, it is set to double click to open file by default. the method to set single click to open file:
(1) Open terminal and modify file (user Pi user authorization):
nano /home/pi/.config/libfm/libfm.conf
(2) Change the statement: single_click =0 to single_click=1, then save and exit
(3) reboot your pi

Tips 2: Keep your Raspberry Pi display lighting all the time
If there isn't any operation, the raspberry Pi will turn off the display automatically, sometimes we want to make our screen keep lighting all the time, you can set as below:
Open the modify the lightdm.conf file
sudo vi /etc/lightdm/lightdm.conf
Find the option server-command which is under [SeatDefaults]
change the statement #xserver-command=X to xserver-command=X -s 0 -dpms
And reboot.
Author say:  Anyone who have some funny tips of raspberry could share at the review. 

Touch Rotating for Waveshare LCD (Modify libinput parameters )

图片
Note:
This method only work for some Waveshare HDMI LCD. And we here take 7inch HDMI LCD (C) as example, use Rapsbian Stretch. The supports LCD are: 7inch HDMI LCD (B) 7inch HDMI LCD (C) 7inch HDMI LCD (H) 10.1inch HDMI LCD (B) 10.1inch HDMI LCD (D) 13.3inch HDMI LCD (H) Some one said that this method also work for 5inch HDMI LCD (B). libinput    libinput is a library that handles input devices for display servers and other applications that need to directly deal with input devices.  The simplified software stack for a system running X.Org is: And on the Touchscreen page we can find the Calibration matrixs: So we could get the matrix values for clockwise (for anticlockwise, just exchange the 90 degree and 270 degree): [0, -1, 1, 1, 0, 0, 0, 0, 1] : 90 degree [-1, 0, 1, 0, -1, 1, 0, 0, 1]: 180 degree [0, 1, 0, -1, 0, 1, 0, 0, 1]: 270 degree
Display Rotation  To rotate the display, you can just add the rotation statement to the config file. Then reboot. The display will be rotated to 90…

Re-Compile Raspbian Kernel for Touch Rotation of Waveshare HDMI LCD

图片
Several months ago, if users of Waveshare HDMI LCD ask about how could I rotate the LCD not only the display but as well as the touch. We always said that you need to re-compile the kernel but we have no instruction about it. And two months ago we provided another method that modify the libinput paramters which you can visit on our wiki website.
   Here I want to share you the way that compiling kernel.
 Install the newest Raspbain to your Raspberry Pi, here we take 2017-11-29-raspbian-stretch and Waveshare 7inch HDMI LCD (C)as examplesStart up your Raspberry Pi and connect it to network and make sure the network is available Install Git and related tool
sudo apt-get install git bc sudo apt-get install libncurses5-devClone the source code, it may cost several minutes
git clone --depth=1 https://github.com/raspberrypi/linuxExecute corresponding commands according to your Raspberry Pi version
#Raspberry Pi 1, Pi 0, Pi 0W and Compute Module use these commands
cd linux KERNEL=kernel make bc…