Let’s see what to do to utilize the HY28B as a screen for our Pi. This time I haven’t connected the “touch” part of the display, so now I can only use it as a 2.8 inch screen, but I will go forward, and set up the touch functions later on.

Some back story
I possess a HY28B 2.8″ touchscreen display, which I have won on a Twitter contest from Modaptix, this first thing I ever won on the Internet, and I really liked the contents of the bundle, the tools inside really helped me become a better maker with the Raspberry Pi.

Now, back in 2015 I have set the HY28B up with a Pi 2 I have won, but I have not made any documentation then, which proved to be a huge mistake, as I had to figure it all out again this weekend.

Wiring
First do the wiring of the Hy28B display to the GPIO pins or the Raspberry Pi according to the this diagram. It contains pinouts for the screen+touch functionality, and also the simple screen setup, too.

Flashing Raspbian to the SD card
Flash the Raspbian image to the SD card, and enable SSH and Wifi on it using the below tutorial:

Enabling SSH and connect to your home WiFi with a headless Pi Zero W

Thanks to this you’ll be able to log in to the Pi via SSH.

Configuration files

First we’ll configure the display’s overlay:

sudo nano /boot/config.txt
add this at the end of the file into a new line:
dtoverlay=hy28b,rotate=90

Then we’ll edit the next file, but instead of adding the text at a new line, here we need to add it at the end of the first line:

sudo nano /boot/cmdline.txt
at the end of the line, add:
fbcon=map:10

Changing the the font

Since this is a small screen, we’ll need a small font to be displayed on it in console mode:

sudo dpkg-reconfigure console-setup

Go through the following menu choices:

Encoding to use on the console: UTF-8
Character set to support: Guess optimal character set
Font for the console: Terminus (default is VGA)
Font size: 6×12 (framebuffer only)

Reboot and victory!
After this we can reboot the Pi, and if we did everything correctly, we will see the terminal screen showing up on the Hy28B.

Used image: 2017-07-05-raspbian-jessie-lite
Last update of the tutorial: 2017-07-09