Media Center HAT FAQ
Follow the links below to access the various sections more quickly
- How to switch the console to HDMI
- How to change the console font
- How to switch the Desktop to HDMI
- How to mirror/copy the HDMI output to the display
- How to switch the backlight on/off
- Where can I find an on-screen keyboard
- Does the display work with OSMC
- Why is the display so small when I use FBCP
- I can only see the top left part of the window
- Where can I find the schematics of the Media Center HAT
- How are the tactile switches connected to the display
- How do I connect a GPIO adaptor to the display
- Can the display burn in
- Why are there lines on my screen
con2fbmap 1 0 and to switch back to the display
con2fbmap 1 1.
The font can be changed with console-setup or edit the file /etc/default/console-setup.
sudo dpkg-reconfigure console-setup
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: 6x12 (framebuffer only)
Raspbian Buster uses lightdm to control the X server. If you haven’t used the install script then you need to edit the /etc/lightdm/lightdm.conf file and edit the comment out line:
For TFT only:
For HDMI only:
For HDMI with TFT extended:
This program is used to copy the primary framebuffer copy to a secondary framebuffer. Usually to copy the output of the HDMI of the Raspberry Pi to a TFT display, whilst scaling down to the display output.
cd /tmp apt-get install -y git build-essential cmake git clone --depth=1 https://github.com/tasanakorn/rpi-fbcp mkdir -p rpi-fbcp/build cd rpi-fbcp/build cmake .. make install fbcp /usr/local/bin/fbcp cd ../.. rm -r rpi-fbcp
The display backlight can be turned on/off and can also be dimmed (using PWM).
- backlight off:
echo 1 | sudo tee /sys/class/backlight/*/bl_power
- backlight on:
echo 0 | sudo tee /sys/class/backlight/*/bl_power
You can install Florence Virtual Keyboard or Matchbox Virtual Keyboard with the following commands:
sudo apt-get install florence
sudo apt-get install matchbox-keyboard
apt-get install rbp-userland-dev-osmc
The framebuffer copies the display from the HDMI output so if the HDMI native resolution is large then it will shrink it down to the TFT display resolution 320×240. To make it more reasonable you can change the resolution by editing the /boot/config.txt file and adding the following:
hdmi_force_hotplug=1 hdmi_group=2 hdmi_mode=4
For a resolution of 640×480 (will be scaled to 320×240 on the display)
Most programs are not designed for a small screen (640×480) and so you see only a part of the window. It is possible to scale the screen with fbcp, but the best practice is to create an user interface specially for the display.
Please note the the 5 way joystick is alternative to the other 4 push buttons SW1-5 and therefore is connected to the same GPIO pins on the Raspberry Pi.
- SW1 GPIO13(PI33) up
- SW2 GPIO17(PI11) left
- SW3 GPIO22(PI15) bottom
- SW4 GPIO26(PI37) right
- SW5 GPIO27(PI13) enter
- B1 5 ways joystick
See the following guide – https://learn.pi-supply.com/make/getting-started-with-the-gpio-to-fpc-breakout-phat-for-raspberry-pi/
An image can also burn in on LCD or OLED displays, if a static image is shown for several hours. To prevent this use a screensaver or make a screen inversion after some time, e.g. a day-night operation with inverted colors. In general a white screen is also better than a black one on TFT displays, in terms of image burn-in.
LCD screens just like any electrical component are sensitive to electrostatic. The lines on the screen are a result of this electrostatic charge. It is important to handle the Media Center HAT with care and take electrostatic precautions as a result.