NES Label Slider With 3.5" TFT and Raspberry Pi Zero W
by originalninja01 in Circuits > Raspberry Pi
1103 Views, 2 Favorites, 0 Comments
NES Label Slider With 3.5" TFT and Raspberry Pi Zero W
Nes was a huge part of my childhood and when i seen this project on thingiverse i just had to do it!
Originally the build was with a raspberry pi 2 or 3 with a 3.5" tft, I just wanted to use a Pi zero w with mine as the cost was substantially better.
OP shared this link
- feh
- https://pimylifeup.com/raspberry-pi-photo-frame/
- read the comments!!
Tried a few times but couldn't quite get it right, feh wouldn't run like it should.
It required full raspbian but this was slow to boot.
So needed a work around.
Setup Your Pi and Screen
There are numerous walkthroughs for setting up your SD card with your raspi image so not going to go into too much detail here.
I used Raspberry Pi Imager, and chose Raspberry Pi OS Lite.
Once that is done, boot it up and type
sudo raspi-config
into your terminal.
here you want to enable SPI and SSH, and also setup your wireless connection here
Again, connecting the 3.5" tft, this video will help with the orientation when connecting them together.
https://www.youtube.com/watch?v=oJRc_KyfSAE&t=130s
Now that is done lets move onto the code.
Installing LCD Drivers
The full details are here https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)
Basically we need to install the drivers for the lcd and then change the display output to display on the LCD and not through HDMI
If you want to SSH to your pi to do this i suggest doing that, i use Putty.
To get the ip address of your pi you can type
hostname -i
into the terminal
SSH into the pi and login.
normally pi is the user and raspberry is password
once you are connected and logged in we need to install git.
to do this type
sudo apt update sudo apt install git
once Git is installed we can move onto installing the driver
run these in the terminal
git clone https://github.com/waveshare/LCD-show.git cd LCD-show/ chmod +x LCD35-show ./LCD35-show lite
Once this is done the device should reboot and now the lcd should display the terminal.
Great now we can install FBI
FBI Install
Thanks to ShanJones01 in depth tutorial for his DIY Raspberry Pi 24" Digital Picture Photo Frame i was able to find out about fbi, Linux framebuffer image viewer.
It is a image viewer that runs without the need for gui, so perfect for the Raspi Zero.
So,
in a terminal type
sudo apt-get install fbi
Thats it!
Move Files
So now we are basically setup we can move some art to the pi.
There are a few ways to do this, NFS , Samba etc but the easiest by far is scp
First we start by making a folder to sit the files in
in a terminal
mkdir nespics
the folder name can be anything but just remember it.
Using the ip address we found with our
hostname -i
we can now send some files over.
Now, there are a couple of ways to display your images correctly, but the easiest way was to make a 480 x 320 image, I just took my images into Illustrator, created a 480 x 320 artboard and rotated the image -90 degrees See photo.
Short of this you can run a --edit parameter before your in your fbi command and use the L key to rotate each image.
fbi --edit -a -t 5 *.jpg
this will run each image for 5 seconds.
Dont run this till after you do the next part.
Now we have our files ready we can move them to our raspberry pi
in a terminal run
scp C:/nespics pi@192.168.1.21:/home/pi/nespics
Replacing C:/nespics with your path for the files.
you should see them transfer.
After this we can test them
in terminal
cd pictures
then type
fbi -a -t 5 *.jpg
the parameters can be found here
https://manpages.ubuntu.com/manpages/bionic/man1/fbi.1.html
but this will run each image for 5 seconds before moving to the next one.
I used this command in mine.
fbi -a -u --noverbose -blend 300 -t 3600 /home/pi/nespics/*
This removes the title, blends the images and changes every hour.
The -t 3600 is in seconds so if you want it to change every 10 minutes do 600 etc.
Auto Launch on Startup
First we need to automatically login to the command line. This can be set up in the Raspberry Pi configuration tool under System Options" > "Boot / Auto Login" > Console Autologin
sudo raspi-config
I added the fbi launch command we created earlier under a file called .bashrc. To edit .bashrc run the command:
nano ~/.bashrc
Then scroll down to the very bottom and add in your command.
fbi -a -u --noverbose -blend 300 -t 3600 /home/pi/nespics/*
"Ctrl + x" to exit and press "y" to save.
Now restart your Raspberry Pi and you should have a working NES Slider
Make Everything Else
To finish my build off i 3d printed the cart and painted with some primer. the colour was good enough so i left it there.
For the base i used my MPCNC to carve out the Nintendo logo onto a piece of scrap Jarrah that i had from a firewood bag. i painted one and left the other raw and much preferred the raw look so opted for that.
routed the sides to give it a nice edge and then finished it off with a coat of polyurethane.