Before You Get Started

I started with absolutely ZERO experience with Linux, Raspberry Pi, and SPI devices. Here’s some things I learned along the way that may be helpful to a beginner like me:

Helpful commands:

cd ~ will take you to the home directory

cd.. will take you one folder back

ls will list files in the folder you’re currently in

If you veer off this tutorial to troubleshoot or find other options please note that anything you find with OMXplayer will no longer work. It was depreciated a year or so ago and it's core library is not available to download. This also means that the Adafruit Video Looper tutorial does not work anymore. I went down a ton of frustrating rabbit holes that were all reliant on the OMXplayer either obviously or not so obviously before cobbling together a solution with the VLC player.

Important Notes

This will only work with a 32-bit version of the Raspberry Pi OS with desktop and was last tested on 12/9/2023 with Bullseye 11.

Wire Your LCD Screen

Wire your LCD screen to your Pi according to the wiring diagram here:

https://www.waveshare.com/wiki/1.14inch_LCD_Module

Image Raspberry Pi V

1. Download and install the Raspberry Pi Imager: https://www.raspberrypi.com/software/

2. Launch Program and install Pi Os with Desktop

I used Bullseye 11 (12/5/2023 version listed in the Imager)

3. I like to pre-configure settings and recommend you do so as well:

Set username and password, configure wireless lan, and set locale settings:

Enable SSH incase you ever need it:

Boot and Setup Your Pi

Put your micro SD card into your Pi, connect a monitor, keyboard and mouse combo (or use a USB hub to use two separate devices), and lastly power

1. Connect Your Pi: Put your micro SD card into your Pi, connect a monitor, keyboard and mouse combo (or use a USB hub to use two separate devices), and lastly power

2. Allow the Pi OS to fully boot and open the Desktop

Connect via SSH

1. On your PC computer go to the search bar and type CMD to open a Command Prompt window

2. Ping Your Pi: Type: ping raspberry.pi You should get results back from the ping, if not, try waiting a minute or two, your pi may still be loading. If that still doesn’t work, make sure your Pi is not in the Looper program

3. SSH into your Pi, type: ssh pi@raspberrypi Login is the same as previous steps

You are now connected and can continue setting up your Pi from the PC desktop in the Command Prompt window!

Enable SPI

1. Enter config settings by typing: sudo raspi-config

2. Choose Interfacing Options -> SPI -> Yes to enable SPI interface

3. Exit

Configure Pi for LCD Screen

These steps are directly from https://www.waveshare.com/wiki/1.14inch_LCD_Module with minor modification for clarity. Enter each of these commands and let finish before moving to the set.

1. Install BCM2835 Libraries:

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.71.tar.gz

tar zxvf bcm2835-1.71.tar.gz

cd bcm2835-1.71/

sudo ./configure && sudo make && sudo make check && sudo make install

2.Install WiringPi libraries

cd ~

sudo apt install wiringpi

For Raspberry Pi systems after May 2019 (earlier than that can be executed without), an upgrade may be required:

wget https://project-downloads.drogon.net/wiringpi-latest.deb

sudo dpkg -i wiringpi-latest.deb

gpio -v

(Run gpio -v and version 2.52 will appear, if it doesn't it means there was an installation error)

3. Install Python Libraries

sudo apt-get update

sudo apt-get install python3-pip

sudo apt-get install python3-pil

sudo apt-get install python3-numpy

sudo pip3 install RPi.GPIO

sudo pip3 install spidev

4.Test Your Screen, download examples:

d ~

sudo apt-get install unzip -y

sudo wget https://files.waveshare.com/upload/8/8d/LCD_Module_RPI_code.zip

sudo unzip ./LCD_Module_RPI_code.zip

5.Compile and Run Code

cd LCD_Module_RPI_code/RaspberryPi/

cd c

Sudo make clean

sudo make -j 8

cd ~

6.Run an Example

cd LCD_Module_RPI_code/RaspberryPi/python/example

ls -l

sudo python3 1inch14_LCD_test.py

Your screen should now be displaying a test image! This is also where you'll use a different code from waveshare to test is your screen size is different than mine.

Install VLC Player (do this BEFORE setting up FBCP)

Install VLC Player (do this BEFORE setting up FBCP)

In your open Command Window, ensure your Pi is entirely up to date, type:

1. In your open Command Window, ensure your Pi is entirely up to date, type:

cd ~

sudo apt update

sudo apt upgrade

2. Install VLC, type:

sudo apt install -y vlc

Add Your Video Your Pi via SCP

This requires you to be able to connect to the Raspberry Pi from your PC. Your Raspberry Pi OS install at this point already has a folder called Videos, so we’ll be using that destination for your files.

1. Move your video file to your desktop on your PC

2. Open a Command Prompt window: Click your start bar search and type cmd to open a Command Prompt on your PC

3. Connect to your Pi via SSH, type:

ssh pi@raspberrypi.local

Type yes if promoted and then login with your pi password.

4. Open a second command prompt window and send files via SCP, type:

cd desktop

scp filenameofvideo.mp4 pi@raspberrypi.local:~/Videos

Your result should show your file name and the a 100% indicator. Repeat as many times as needed for whatever videos you’d like to have play on startup!

Make VLC Autostart, Full Screen and Play from your Videos Folder

Instructions were taken from here with slight modification: https://forums.raspberrypi.com/viewtopic.php?t=17051

IMPORTANT: Do not use sudo on any of these commands or it will set permissions in a way that the pi user that is automatically logged in will not be able to use it and it will not autostart.

1. Create an Autostart directory, type:

mkdir /home/pi/.config/autostart

2.Create a.desktop file with the instructions for autostarting VLC and looping the video with no video title, type:

nano /home/pi/.config/autostart/autovlc.desktop

Add the lines:

[Desktop Entry]

Type=Application

Exec=/usr/bin/vlc -f --loop --no-video-title /home/pi/playlist.m3u

Press CTRL X and type Y for yes when asked to save

3.Create the playlist for your video files, type:

nano /home/pi/playlist.m3u

Add the lines:

/home/pi/Videos/yourvideo.mp4

(add as many lines like this as you have files, do not include this text)

4. Reboot your Pi, type:

Sudo reboot

Make sure your Pi is hooked up to a monitor, you should be able to see the VLC player load, full screen, play your playlist and loop back to the start of the playlist when at the end! Important: Your video will not yet be playing on your small LCD screen, you will need to complete the FBCP Porting steps.

FBCP Porting

This will mirror your HDMI output to your SPI LCD. These steps are from: https://www.waveshare.com/wiki/1.14inch_LCD_Module

Important: If following the directions directly on the waveshare page linked above, the script function would not work for me and I had to use the manual instructions to finish setup. I believe this has something to do with the newer Pi OS.

1. Install the drivers, type:

cd ~

sudo apt-get install cmake -y

wget https://files.waveshare.com/upload/1/18/Waveshare_fbcp.zip

unzip Waveshare_fbcp.zip

cd Waveshare_fbcp/

sudo chmod +x ./shell/*

2. Remove the conflicting DRMVC4 statement, type:

sudo nano /boot/config.txt

Delete this section:

CTRL X to exit, Y to save

3. Reboot the pi, type:

sudo reboot

4. Configure, compile and run, type:

cd Waveshare_fbcp/

mkdir build

cd build

sudo cmake -DSPI_BUS_CLOCK_DIVISOR=20 -DWAVESHARE_1INCH14_LCD=ON -DBACKLIGHT_CONTROL=ON -DSTATISTICS=0 ..

^^ (from sudo to =0 is all one line, make sure to copy the whole thing)

sudo make -j

sudo ./fbcp

This is another place where you'll use different code if your screen is a different size than mine. Change the line that starts with sudo cmake with the appropriate one from the waveshare website linked above.

5. Setup this functionality to start automatically when you boot your Pi, type:

sudo cp ~/Waveshare_fbcp/build/fbcp /usr/local/bin/fbcp

sudo nano /etc/rc.local

Add fbcp& before exit 0.

Important: You must add "&" to run in the background. Otherwise, the system may not be able to start.

Important: My video files are already formatted for my screen resolution when I create them. Yours may not be be, so if things look wonky, check out the final steps in the waveshare guide for setting the display resolution: https://www.waveshare.com/wiki/1.14inch_LCD_Module#Set_the_Display_Resolution

OPTIONAL - Add a Second SPI LCD

Since my use case is to create eyes in a companion pet robot, I needed a second screen to play the exact same video output that my first screen was playing. For the tiny screens I used, I did not end up needing a secondary power supply, hooray!

1. Splice together the wires of both screens and put a male pin connector on the end

2. Plugin the wires to the Pi exactly how you did previously

When your Pi boots, it should be playing the same video on both screens