Working with a Raspberry Pi is fun. Working with Windows 10 IoT Core is even more fun, combined with that Rpi. But it’s a bit annoying that we have to drag a big LCD monitor along when we want to do some visual XAML stuff on it.
Should it not be nice to use one of those tiny LCD screens on your Rpi? You can buy them for approx. 25 dollars so these are really interesting. They have HDMI, they are powered by USB and it’s even possible to put some touch to them 🙂
So I ordered one. It came in a nice package and connecting it to the Rpi was easy, just connect an HDMI cable and plug in the micro USB connector for power.
But then I got scared, this is what was shown on the screen:
It should be clear that the vertical black bar was not to be shown there!
After the Shock or Disbelief, the Denial, the Anger, etc. there was Acceptance and Hope. A good friend pointed out that the Rpi could use some configuration to handle these small screen resolutions.
So I looked at the config.txt which can be found in the root of the image on the MicroSD card on the Rpi.
gpu_mem=32 # set ARM to 480Mb DRAM, VC to 32Mb DRAM framebuffer_ignore_alpha=1 # Ignore the alpha channel for Windows. framebuffer_swap=1 # Set the frame buffer to be Windows BGR compatible. disable_overscan=1 # Disable overscan init_uart_clock=16000000 # Set UART clock to 16Mhz hdmi_group=2 # Use VESA Display Mode Timing over CEA arm_freq=900 arm_freq_min=900 force_turbo=1
Note: ignore wrapping if shown. Comments should only fill one line. Just compare it with your own config.txt
So after some searching, I found the resolution:
... hdmi_group=2 # Use VESA Display Mode Timing over CEA hdmi_mode=1 # 5 inch screen hdmi_mode=87 # 5 inch screen hdmi_cvt 800 480 60 6 0 0 0 # 5 inch screen ...
Just add these extra three lines and you are back in business. You can just do that on your laptop the same way as you created the image: using an SD card adapter.
Note: make a backup first!
Now look at this screen:
As you can see we even have a scrollbar.
So now you have a small transportable screen which works just fine when you are developing for Windows 10 IoT Core.
If you are a Raspbian or Raspbian Jessie light user, this will work for you took. Just open /boot/config.txt and add the same four lines. And reboot afterwards.