Cheap TFT / LCD touch screen for RaspberryPi with Jessy

TFT screen on a raspberryPi
TFT screen on a raspberryPi

This week I had to play with some TFT screen for RapberryPi for making a prototype for a local company. You can find many TFT screen on Internet but most of them are not coming with a nice fresh documentation for being use and it is kickly a mess to get it start with them. I ordered different one having the same 3.2” size matching my need and got 2 of them for starting tests.

This post details how to use a such screen for displaying a picture on it from a console line.

The screen received respond to the 3.2” LCD resistive touch screen on google and different shops. It is compatible waveshare32b. It looks like this :

TFT_For_RapsberryPiTo make it working on a raspbian, it it now simple as the notro/fbtft project is compiled with the kernel in the Jessy version.

This screen is working with SPI interface. The first step is to activate it in the /boot/config.txt file.

dtparam=spi=on

Once done you have to reboot the pi to make it activated. Since, you can activate the kernel driver with the following parameters :

# modprobe fbtft_device name=waveshare32b gpios=dc:22,reset:27 speed=48000000

I’m not sure they are optimal for this screen and I saw many other option you could activate in this driver for a such screen. For my own user it was sufficient.

Then to activate the TFT screen as a console and display the command line on it you have to use the following command :

# con2fbmap 1 1

Most of these information are coming from the notro/fbtft wiki you can find following this link.

Once we have a text console, we can display picture on it. For this purpose, I found the FIM project. This simple command line tool display a picture on the screen. I was using version 0.5rc2 impossible to compile. But 0.4rc3 worked well on my jessy. You need to compile it. I had some trouble with readline library not correctly recognized by the ./configure script. By the way, it works well also if you deactivate it.

I did all my test on a raspberryPi Zero and Jessy version 16-02-09.

This entry was posted in Hardware and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.