UltiCon Setup Menagerie - Raspberry Pi and the UCTRONICS Screen
I ordered a 64GB SD card to transplant my project (read: collection of crappy PoC programs) so I had to get the RasPi again which is kind of a perfect opportunity to show how to get your Raspberry Pi up and running.
I usually prefer to start in headless mode. If youâre more comfortable with a GUI, itâs totally fine, donât let anyone bully you into using command line. Just do it because you want to learn it. It comes with the benefit that, if you donât use X you get some performance gains, though Iâm not sure how much (letâs run metrics someday!).
These will be instructions for a Linux computer since thatâs my daily driver. If you havenât tried Ubuntu these days or encountered a million problems in the past, trust me when I tell you itâs very approachable these days and very stable.
Letâs Setup Headless Mode!
Okay so letâs setup headless mode. You can also find these instructions on the Raspberry Pi Foundation website: https://www.raspberrypi.org/documentation/configuration/wireless/headless.md
1. Download a Lite version of Raspberry Pi OS from The Foundation https://www.raspberrypi.org/downloads/raspberry-pi-os/
2. Flash it to your SD card
Find your SD card first in /dev. For this, I like to be doubly sure by either opening GParted (a GUI program that allows you to format disks in certain ways but also shows the size of disks) or running fdisk -l to find the disk that is the right size. For me, that is located at /dev/mmcblk0. Replace that as needed in the command below
dd bs=4M if=2020-02-13-raspbian-buster-lite.img of=/dev/mmcblk0 conv=fsync
It will be completely quiet until you get a new prompt which means itâs finished.
3. Once youâve done that, letâs get it ready so that you can access it. The first thing you want to do is make sure you get ssh access.
Mount the partition named âbootâ from the SD card and, cd into that directory, and create an empty file called ssh
cd /mnt/boot
sudo touch ssh
4. Next, in the same directory, make a file called wpa_supplicant.conf and put in your wifi credentials and the country code for the country in which you live. This will make it connect to your wifi immediately upon booting. I have a file I always copy that looks like this.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=US
network={ ssid="greatestSsidNameEver" psk="superstrongpassword" }
But change your country code, ssid, and psk as appropriate.
Thatâs it for headless mode. Plug it into your pi, let it boot and then you can ssh into it!
First Pi Things to Do
I didnât really mean for this to turn into a Pi tutorial but here we are.
The first thing you want to do when you get into your pi is to change yuor password using
passwd
Next up, make sure your filesystem is expanded so that you get to use all of that space.
First launch raspi-config
sudo raspi-config
Then hit âAdvanced Operationsâ
Then âExpand Filesystemâ
hit Yes, Finish, then let it reboot.
Now, itâs always a good idea to install git but it will also be needed for the UCTRONICS screen. Run
sudo apt install git
Finally, update everything with
sudo apt update
sudo apt upgrade
Getting the UCTRONICS Screen Working
So I donât put the device on the headers first. I start with just HDMI first and make sure I can flip it and get the scaling right.
When you first plug it in it looks like this:
What weâre going to do is pull scripts from github and then run them to basically just set the screen settings on boot.
1. Clone the repo
git clone https://github.com/UCTRONICS/UCTRONICS_LCD35_HDMI_RPI.git
It gives you a new folder called UCTRONICS_LCD35_HDMI_RPI which contains a README.md. I shouldnât have to tell you to read it but, if you donât, Iâll copy the instructions down here:
Go into the Raspbian directory within that folder
cd UCTRONICS_LCD35_HDMI_RPI/Raspbian/
Make the scripts executable
sudo sed -i -e 's/\r$//' *.sh
chmod +x *.sh
Backup your settings
sudo ./backup.sh
And finally, install the driver.
sudo ./install_uc_touch_180.sh
That will trigger a reboot and, when everything comes back up, it should be at a size that you can read. The problem I found was that whether I ran install_uc_touch_0.sh or install_uc_touch_180.sh, it would be the same direction so I ended up also having to edit /boot/config.txt
sudo nano /boot/config.txt
and then add at the end of the file
display_rotate=2
for 180 degree rotation on every boot.
And thatâs it! Now it looks like this.
Alright, weâre at a fantastic starting point for the next steps. Tune in next week for more and, for the most up-to-date code, Iâm keeping my repo updated with all my tests so feel free to check it https://github.com/amckeeota/UltiCon
Til next time!














