Waveshare 1.3 Pi
Appearance
Setup
[edit]- Run through raspi-config and make sure localisation and everything is setup how you want it
- Update the pi fully
- Enable SSH (optional)
- Enable SPI and I2C in interfacing
- Reboot
sudo apt-get install libraspberrypi-dev raspberrypi-kernel-headers git python-dev python-pil python-smbus python-serial python-pip cmake git clone git://git.drogon.net/wiringPi # OR wget https://www.waveshare.com/w/upload/f/f3/WiringPi.tar.gz cd wiringPi/ git pull origin ./build cd .. wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.58.tar.gz tar -xvf bcm2835-1.58.tar.gz cd bcm2835-1.58/ ./configure make sudo make check sudo make install pip install spidev pip install rpi.gpio pip install numpy
- Next we need to append the following to /etc/modules
spi-bcm2835 flexfb fbtft_device
- Now create /etc/modprobe.d/fbtft.conf (2 lines starting with "options")
options flexfb setaddrwin=0 width=240 height=240 init=-1,0x11,-2,120,-1,0x36,0x70,-1,0x3A,0x05,-1,0xB2,0x0C,0x0C,0x00,0x33,0x33,-1,0xB7,0x35,-1,0xBB,0x1A,-1,0xC0,0x2C,-1,0xC2,0x01,-1,0xC3,0x0B,-1,0xC4,0x20,-1,0xC6,0x0F,-1,0xD0,0xA4,0xA1,-1,0x21,-1,0xE0,0x00,0x19,0x1E,0x0A,0x09,0x15,0x3D,0x44,0x51,0x12,0x03,0x00,0x3F,0x3F,-1,0xE1,0x00,0x18,0x1E,0x0A,0x09,0x25,0x3F,0x43,0x52,0x33,0x03,0x00,0x3F,0x3F,-1,0x29,-3 options fbtft_device name=flexfb gpios=reset:27,dc:25,cs:8,led:24 speed=125000000 bgr=1 fps=60 custom=1 height=240 width=240
- Might need a reboot at this point
wget https://www.waveshare.com/w/upload/c/c9/1.3inch_LCD_HAT.tar.gz tar -xvf 1.3inch_LCD_HAT.tar.gz cd 1.3inch_LCD_HAT/fbtft python fb.py
- Screen should be working at this point
git clone https://github.com/tasanakorn/rpi-fbcp cd rpi-fbcp/ mkdir build cd build/ cmake .. make sudo install fbcp /usr/local/bin/fbcp
- Edit /etc/rc.local and add the following before "exit 0"
fbcp&
- Append /boot/config.txt with
disable_overscan=1 hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=87 hdmi_cvt=240 240 60 1 0 0 0