Skip to content

Instantly share code, notes, and snippets.

@albertfilice
Created October 5, 2015 23:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save albertfilice/81eab110b9ba6e73c384 to your computer and use it in GitHub Desktop.
Save albertfilice/81eab110b9ba6e73c384 to your computer and use it in GitHub Desktop.
How I set up the 4inch WaveShare screen on the Raspberry Pi 2 so hopefully I can do it again.
RASPBIAN WHEEZY
Clean install
Edit /usr/share/X11/xorg.conf.d/99-fbturbo.conf
$ sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
>> Option “fbdev” “/dev/fb0″ and change the fb0 to fb1:
Enable SPI
sudo raspi-config
>> Advanced settings
>> Enable SPI and turn on at boot
Update Firmware (probably)
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update
Add to modules
sudo vi /etc/modules
>> flexfb nobacklight regwidth=16 init=-1,0xb0,0x0,-1,0x11,-2,250,-1,0x3A,0x55,-1,0xC2,0x44,-1,0xC5,0x00,0x00,0x00,0x00,-1,0xE0,0x0F,0x1F,0x1C,0x0C,0x0F,0x08,0x48,0x98,0x37,0x0A,0x13,0x04,0x11,0x0D,0x00,-1,0xE1,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0xE2,0x0F,0x32,0x2E,0x0B,0x0D,0x05,0x47,0x75,0x37,0x06,0x10,0x03,0x24,0x20,0x00,-1,0x36,0x28,-1,0x11,-1,0x29,-3 width=480 height=320
>> fbtft_device name=flexfb speed=16000000 gpios=reset:25,dc:24
Add to the cmdline.txt file
$ sudo vi /boot/cmdline.txt
>> fbcon=map:1 fbcon=font:ProFont6x11
Add to the config.txt file
$ sudo vi /boot/config.txt
>> dtoverlay=ads7846,speed=500000,penirq=17,swapxy=1
@jjpython
Copy link

As a newbie to the pi world, could I ask, will this work on the pi zero?? I have a screen 4inch ips waveshare pear that I am failing to get installed

@albertfilice
Copy link
Author

As a newbie to the pi world, could I ask, will this work on the pi zero?? I have a screen 4inch ips waveshare pear that I am failing to get installed

Ya know, I'm not sure. Have you tried it since?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment