configuring raspberry pi without tft display made in china

Hello, I just ordered my first Raspberry PI CM4 Compute module, it will hopefully arrive in the next few months. I am trying to source some other parts needed for a project and seem to be coming up short when looking for screens.

I really don"t want to use the HDMI interface and would like to stick with DSI due to it"s low-power requirements and singular connection back to the raspberry pi.

That"s the only DSI touchscreen display compatible with the Raspberry Pi for far. For the display you will have to use a 22-pin DSI adapter (to 15-pin).

DSI displays (without touch) have been connected successfully (i.e. https://github.com/harlab/CM4_LCD_LT070ME05000) but touch part requires additional effort/not implemented yet.

The only DSI display supported by the firmware is the Raspberry Pi 800x480 7" touchscreen, and then only one instance of it (IIRC you can choose whether that is connected to DISP1 (default) or DISP0).

We currently have overlays for the Pi 7" panel (vc4-kms-dsi-7inch), and JDI LT070ME05000 1200x1920 (vc4-kms-dsi-lt070me05000). Both are configured to use the DISP1 connector on the CMIO boards. vc4-kms-dsi-7inch could be tweaked to work on DISP0, but as that only supports 2 data lanes it won"t support LT070ME05000.

If you don"t have a complete datasheet for your panel, then you have a huge task ahead of you. Debugging DSI is VERY hard in that if things are wrong then the panel just sits there dumbly and gives you no indication of what is wrong. Pi Towers is in the process of buying a DSI analyser to try and give ourselves a better chance at being sure that the Pi is doing what it is asked.

Even me knowing all the dirty details of the panel under test, having all available TCON documentation on hands (data sheet, app notes, dedicated app not dealing with the MUX and DGC, etc) did not allow me to get the display to life; overlay was loaded, X working fine but pitch black screen. A DSI analyser is for sure a must have here from my POV, but only affordable for business use. So, good to hear that Pi Towers is investing in this.

Very good information, thank you so much! It sounds like of the 2 DSI connectors provided by CM4, 1 operates at a maximum of 4 lanes, and the 2nd operates at a maximum of 2 lanes. Not that big of an issue, having one display with a high quality resolution hooked up to the 4 lane port and then a much lower quality resolution hooked up to the other would be perfectly fine for my project.

Unfortunately it sounds like the DSI specification provided by raspberry pi hasn"t been well adopted, if at all, by manufacturers of PI hardware even though there seems to be an outcry for it from the community. I think I read in another forum post that only up until recently has the DSI spec on the PI been upgraded to 4 lanes on one of the ports. Maybe now more hardware will start rolling out for it since capabilities have expanded.

Nonetheless, this seems like a huge undertaking, especially for a novice like myself.. Sadly the bezel around the official raspberry pi dsi touchscreen is much too large. I must be able to fit my screen into a maximum of 100mm height by 178mm width..

Very good information, thank you so much! It sounds like of the 2 DSI connectors provided by CM4, 1 operates at a maximum of 4 lanes, and the 2nd operates at a maximum of 2 lanes. Not that big of an issue, having one display with a high quality resolution hooked up to the 4 lane port and then a much lower quality resolution hooked up to the other would be perfectly fine for my project.

2-lane DSI is able to support 1360x768, 3-lane is perfectly fine for 1920x1080 , so what is your understanding of "high quality resolution"? Some folks consider a high PPI as "high quality"..

Unfortunately it sounds like the DSI specification provided by raspberry pi hasn"t been well adopted, if at all, by manufacturers of PI hardware even though there seems to be an outcry for it from the community. I think I read in another forum post that only up until recently has the DSI spec on the PI been upgraded to 4 lanes on one of the ports. Maybe now more hardware will start rolling out for it since capabilities have expanded.

The CM4 is changing the story because the module itself offers WiFi/BT and Ethernet and the CM4IO and a huge range of third party platforms (thanks to the having the design files available un KiCAD) make using it as simple as a normal Pi. Advantage: dual CSI and dual DSI interface is available which offers a huge set of possibilities.

Nonetheless, this seems like a huge undertaking, especially for a novice like myself.. Sadly the bezel around the official raspberry pi dsi touchscreen is much too large. I must be able to fit my screen into a maximum of 100mm height by 178mm width..

Getting a DSI display to work on ANY platform is a "huge undertaking" for professionals too! Debugging DSI is a pain in the back and requires special - high expensive - tools.

So, if you need two 4-lane DSI (or even a 8-lane) stay away from RPi and use another SOC platform. Ohh .. Be warned ., they will be more expensive and more complex to use. And .. There is no simple/small baseboard for most cases.

Unfortunately it sounds like the DSI specification provided by raspberry pi hasn"t been well adopted, if at all, by manufacturers of PI hardware even though there seems to be an outcry for it from the community. I think I read in another forum post that only up until recently has the DSI spec on the PI been upgraded to 4 lanes on one of the ports. Maybe now more hardware will start rolling out for it since capabilities have expanded.

It is true that very few people had tried to use it, but that"s partly down to the complexity of DSI. It isn"t a plug and play interface in the way that HDMI, VGA, or DP are, and it"s more complex than DPI in that you have a command path that is frequently used to configure the panel/driver chip as well as sending it video data. It"s certainly beyond most hobbyists, and I don"t see that changing, largely because documentation on the panels is frequently lacking.

So, if you need two 4-lane DSI (or even a 8-lane) stay away from RPi and use another SOC platform. Ohh .. Be warned ., they will be more expensive and more complex to use. And .. There is no simple/small baseboard for most cases.

The asymmetry in CSI and DSI ports harks back to VideoCore"s origins in mobile devices. At least when the IP was being written you typically had a lower resolution front camera, and high res rear camera hence a 2 lane and 4 lane CSI interface, and likewise one high res main screen (4 lane) and potentially a smaller status screen (2 lane).

I"m restricted to using two 7" screens. 800x480 vs 1360x768 is either more or less pixels in the same footprint so inherently the PPI will be higher or lower depending on which you choose. I suppose I should be more specific here and state that I"m looking for the native resolutions here, not upscaling or anything like that.

DSI interface has been speced by Mobile Industry Processor Interface Alliance - in short MIPI, and as indicated by the name targeting an interface spec for mobile applications. As such, there is no need for an "interface board".

Display is directly connected to the SOC without any glue logic. In case of the Broadcom devices the DSI is 2-lane and 4-lane as mentioned by 6by9. Don"t expect this to change in the near future as it requires a new SOC design (as said too).

So, as you want to use CM4 you can "easily" design your custom baseboard which has i.e. two ​TC358870XBG https://toshiba.semicon-storage.com/eu/ ... 40XBG.html connected to the HDMI interfaces. The CM4 will happily drive two (up to) 3840x2160, 30 fps, 24 bpp displays for you.

The following MIPI interface OLED and LCD panels already have firmware connectivity solutions. It may still require a custom FPC cable to meet specific project requirements:

Nope! I am 99.99% confident that you can"t simply buy what you"re looking for. But, I"m 100% confident it can be developed! It requires time, effort and a pile of money.

I agree with others, if DSI screen, then I would take the original Raspberry DSI screen [I just write this posting in hospital with that display, but don"t use its touch functionality (that works) -- but touchpad of Logitech K400+ wireless keyboard instead]. @aBUGSwortsnightmare just helped me resolve "800x480 display too small for using gimp" issue via software:

I use 1024x600 HDMI no-touch 9" display without any issues (26$ inclusive(!) driver board and shipping from China). I really like 9" 1024x600 displays over 7" 1024x600 displays -- spending 10$ more you can even get 10" 1024x600 HDMI display with same driver (I switched driver boards between 9" and 10" displays and they work):

Beware of 7" 1024x600 displays that only have rgb666 colors (I have one from Waveshare). The 1024x600 9" and 10" displays cost less than the Waveshare one (45$), and have rgb888 colors!

configuring raspberry pi without tft display made in china

So I don"t know how much help I can be as I don"t know recalBOX and have a 3.5" LCD coming from China. As I understand, the fbcp program moves the screen data from framebuffer 0, HDMI, to framebuffer 1, LCD. This allows you to display your desktop on the LCD but has a performance hit so you can"t achieve a full 60fps.

Your second link does include a link to the fbcp Git hub, https://github.com/ian57/rpi-fbcp. At that link there are precompiled bins that should work, just copy into /usr/bin You shouldn"t need to compile unless you are making changes to fbcp.

configuring raspberry pi without tft display made in china

Connecting an LCD to your Raspberry Pi will spice up almost any project, but what if your pins are tied up with connections to other modules? No problem, just connect your LCD with I2C, it only uses two pins (well, four if you count the ground and power).

There are a couple ways to use I2C to connect an LCD to the Raspberry Pi. The simplest is to get an LCD with an I2C backpack. But the hardcore DIY way is to use a standard HD44780 LCD and connect it to the Pi via a chip called the PCF8574.

The PCF8574 converts the I2C signal sent from the Pi into a parallel signal that can be used by the LCD. Most I2C LCDs use the PCF8574 anyway. I’ll explain how to connect it both ways in a minute.

I’ll also show you how to program the LCD using Python, and provide examples for how to print and position the text, clear the screen, scroll text, print data from a sensor, print the date and time, and print the IP address of your Pi.

Connecting an LCD with an I2C backpack is pretty self-explanatory. Connect the SDA pin on the Pi to the SDA pin on the LCD, and the SCL pin on the Pi to the SCL pin on the LCD. The ground and Vcc pins will also need to be connected. Most LCDs can operate with 3.3V, but they’re meant to be run on 5V, so connect it to the 5V pin of the Pi if possible.

If you have an LCD without I2C and have a PCF8574 chip lying around, you can use it to connect your LCD with a little extra wiring. The PCF8574 is an 8 bit I/O expander which converts a parallel signal into I2C and vice-versa. The Raspberry Pi sends data to the PCF8574 via I2C. The PCF8574 then converts the I2C signal into a 4 bit parallel signal, which is relayed to the LCD.

Before we get into the programming, we need to make sure the I2C module is enabled on the Pi and install a couple tools that will make it easier to use I2C.

Now we need to install a program called I2C-tools, which will tell us the I2C address of the LCD when it’s connected to the Pi. So at the command prompt, enter sudo apt-get install i2c-tools.

Next we need to install SMBUS, which gives the Python library we’re going to use access to the I2C bus on the Pi. At the command prompt, enter sudo apt-get install python-smbus.

Now reboot the Pi and log in again. With your LCD connected, enter i2cdetect -y 1 at the command prompt. This will show you a table of addresses for each I2C device connected to your Pi:

We’ll be using Python to program the LCD, so if this is your first time writing/running a Python program, you may want to check out How to Write and Run a Python Program on the Raspberry Pi before proceeding.

There are a couple things you may need to change in the code above, depending on your set up. On line 19 there is a function that defines the port for the I2C bus (I2CBUS = 0). Older Raspberry Pi’s used port 0, but newer models use port 1. So depending on which RPi model you have, you might need to change this from 0 to 1.

The function mylcd.lcd_display_string() prints text to the screen and also lets you chose where to position it. The function is used as mylcd.lcd_display_string("TEXT TO PRINT", ROW, COLUMN). For example, the following code prints “Hello World!” to row 2, column 3:

On a 16×2 LCD, the rows are numbered 1 – 2, while the columns are numbered 0 – 15. So to print “Hello World!” at the first column of the top row, you would use mylcd.lcd_display_string("Hello World!", 1, 0).

You can create any pattern you want and print it to the display as a custom character. Each character is an array of 5 x 8 pixels. Up to 8 custom characters can be defined and stored in the LCD’s memory. This custom character generator will help you create the bit array needed to define the characters in the LCD memory.

The code below will display data from a DHT11 temperature and humidity sensor. Follow this tutorial for instructions on how to set up the DHT11 on the Raspberry Pi. The DHT11 signal pin is connected to BCM pin 4 (physical pin 7 of the RPi).

By inserting the variable from your sensor into the mylcd.lcd_display_string() function (line 22 in the code above) you can print the sensor data just like any other text string.

configuring raspberry pi without tft display made in china

Key information: This device"s controller is an ILI9486, which is compatible with ILI9481. The driver for ILI9481 was already in my Raspberry Pi. Here"s what I did to make it work:

I don"t care about the touch-screen, so I didn"t set it up. All I need this is to show me the IP address of the Raspberry Pi so I can connect through SSH. (This is an issue you may encounter only if you find your RPi connecting to WiFi where you cannot control the IP address assignments and with ridiculously short lease times.)

configuring raspberry pi without tft display made in china

A number of people have used a Motorola Atrix Lapdock to add a screen and keyboard with trackpad to RasPi, in essence building a RasPi-based laptop computer. Lapdock is a very clever idea: you plug your Atrix smart phone into Lapdock and it gives you an 11.6" 1366 x 768 HDMI monitor with speakers, a keyboard with trackpad, two USB ports, and a large enough battery for roughly 5 hours of use. The smart phone acts as a motherboard with "good enough" performance. The advantage over a separate laptop or desktop computer is that you have one computing device so you don"t need to transfer files between your phone and your desk/laptop.

Unfortunately for Motorola, Lapdock was not successful (probably because of its US$500 list price) and Motorola discontinued it and sold remaining stock at deep discounts, with many units selling for US$50-100. This makes it a very attractive way to add a modest size HDMI screen to RasPi, with a keyboard/trackpad and rechargeable battery power thrown in for free.

Lapdock has two connectors that plug into an Atrix phone: a Micro HDMI D plug for carrying video and sound, and a Micro USB plug for charging the phone and connecting to the Lapdock"s internal USB hub, which talks to the Lapdock keyboard, trackpad, and two USB ports. With suitable cables and adapters, these two plugs can be connected to RasPi"s full-size HDMI connector and one of RasPi"s full-size USB A ports.

The RasPi forum has a long thread on Lapdock with many useful suggestions, photos, and links: I made a Raspberry PI Laptop. There"s also a good "blog entry at element14 with photos and suggestions of where to get cables and adapters: Raspberry Pi Laptop. TechRepublic has a tear-down article with photos of Lapdock internal components here: Cracking Open the Motorola Droid Bionic Lapdock. Paul Mano has a wealth of photos of Lapdock innards at Motorola Atrix Lapdock mod projects.

Lapdock uses the HDMI plug to tell if a phone is plugged in by seeing if the HDMI DDC/CEC ground pin is pulled low. If it"s not, Lapdock is powered off. As soon as you plug in a phone or RasPi, all the grounds short together and Lapdock powers itself on. However, it only does this if the HDMI cable actually connects the DDC/CEC ground line. Many cheap HDMI cables do not include the individual ground lines, and rely on a foil shield connected to the outer shells on both ends. Such a cable will not work with an unmodified Lapdock. There is a detailed "blog entry on the subject at element14: Raspberry Pi Lapdock HDMI cable work-around. The "blog describes a side-benefit of this feature: you can add a small power switch to Lapdock so you can leave RasPi attached all the time without draining the battery.

The Lapdock Micro USB plug is the upstream port of Lapdock"s internal USB hub, and connects to one of RasPi"s full-size USB ports. Lapdock is not USB compliant since it provides upstream power on its Vbus pin. Lapdock uses this to charge the Atrix phone. You can use this feature to power RasPi if you have a newer RasPi. The original RasPi rev 1 has 140 mA polyfuses F1 and F2 to protect the USB ports, which are too small for powering RasPi using upstream power. Newer RasPis replace F1 and F2 with zero Ohm jumpers or eliminate them entirely, which allows Lapdock to provide power. If you don"t mind modifying your original RasPi, you can add shorting jumpers over F1 and F2 or replace them with higher-current fuses.

What gets powered on depends on whether Lapdock is open or closed. If it"s open, the screen and all Lapdock USB ports are powered. If you close Lapdock, the screen and full-size USB ports are powered down, but the Micro USB still provides upstream power. This is for charging an Atrix phone. When you open or close Lapdock, the Micro USB power switches off for about a second so if your RasPi is connected it will reboot and you may have a corrupted file system. There"s discussion about this at the RasPi forum link, and someone has used a supercapacitor to work around the problem: Raspberry Pi lapdock tricks.

When you do not connect a HDMI monitor, the GPU in the PI will simply rescale (http://en.wikipedia.org/wiki/Image_scaling) anything that would have appeared on the HDMI screen to a resolution suitable for the TV standard chosen, (PAL or NTSC) and outputs it as a composite video signal.

The Broadcom BCM2835 only provides HDMI output and composite output. RGB and other signals needed by RGB, S-VIDEO or VGA connectors are however not provided, and the R-PI also isn"t designed to power an unpowered converter box.

Note that any conversion hardware that converts HDMI/DVI-D signals to VGA (or DVI-A) signals may come with either an external PSU, or expects power can be drawn from the HDMI port. In the latter case the device may initially appear to work, but there will be a problem, as the HDMI specs only provide in a maximum of 50mA (@ 5 Volt) from the HDMI port, but all of these adapters try to draw much more, up-to 500mA, in case of the R-PI there is a limit of 200mA that can be drawn safely, as 200mA is the limit for the BAT54 diode (D1) on the board. Any HDMI to VGA adapter without external PSU might work for a time, but then burn out D1, therefore Do not use HDMI converters powered by the HDMI port!

The solution is to either only use externally powered converters, or to replace D1 with a sturdier version, such as the PMEG2010AET, and to replace the power input fuse F3 with a higher rated one, as the current one is only 700mA, and the adapter may use 400mA itself. Also notice that the R-PI"s power supply also must be able to deliver the extra current.

Alternatively, it may be possible to design an expansion board that plugs into the LCD headers on the R.Pi. Here is something similar for Beagleboard:

The schematics for apples iPhone 3gs and 4g suggest they speak DSI, thus they can probably be connected directly. The older iPhones use a "Mobile Pixel Link" connection from National Semiconductor. The 3GS panel (480×320) goes as low as US $14.88, while the 4G one (960×640, possibly the LG LH350WS1-SD01, with specifications) can be had for US $17.99 or as low as US $14.28. The connectors used might be an issue, but this connector might fit. Additional circuitry might be necessary to provide the display with required 1.8V and 5.7V for operation, and an even higher voltage for the backlight.

The Raspberry Pi provides one clock lane and two data lanes on the S2 connector, as can be read from the schematics. It is currently unknown whether this is enough to drive the iPhone 4G screen, as that screen seems be driven with three data lanes in its original application.

I2C/SPI ADC can be used to interface 4 pin resistive Touch Screens, For example STMPE812A. Texas Instruments has a solution for 4 or 8 wire touchscreens using their rather cheap MSP4309.

Parallel interface displays can be found in many sizes, usually up to 7" and more. Parallel interfaces are usually 8 or 16-bits wide (sometimes 18 or 24-bit wide), plus some control-lines. The Raspberry Pi P1-connector does not contain enough GPIOs for 16-bit wide parallel displays, but this could be solved by borrowing some GPIOs from the CSI-connector or from P5 (on newer Raspberry Pis). Alternatively, some additional electronics (e.g. shift-registers or a CPLD) can be used, which could also improve the framerate or lower the CPU-load.

AdvaBoard RPi1: Raspberry Pi multifunction extension board, incl. an interface and software for 3.2"/5"/7" 16-bit parallel TFT-displays incl. touchscreen with up to 50 frames/s (3.2", 320x240)

Texy"s 2.8" TFT + Touch Shield Board: HY28A-LCDB display with 320 x 240 resolution @ 10 ~ 20fps, 65536 colors, assembled and tested £24 plus postage, mounts on GPIO pins nicely matching Pi board size, or via ribbon cable

configuring raspberry pi without tft display made in china

The RPi LCD can be driven in two ways: Method 1. install driver to your Raspbian OS. Method 2. use the Ready-to-use image file of which LCD driver was pre-installed.

2) Connect the TF card to the PC, open the Win32DiskImager software, select the system image downloaded in step 1 and click‘Write’ to write the system image. ( How to write an image to a micro SD card for your Pi? See RPi Image Installation Guides for more details)

3) Connect the TF card to the Raspberry Pi, start the Raspberry Pi. The LCD will display after booting up, and then log in to the Raspberry Pi terminal,(You may need to connect a keyboard and HDMI LCD to Pi for driver installing, or log in remotely with SSH)

This LCD can be calibrated through the xinput-calibrator program. Note: The Raspberry Pi must be connected to the network, or else the program won"t be successfully installed.

configuring raspberry pi without tft display made in china

A parallel RGB interface up to 24 bits is available on all Raspberry Pi boards with the 40-way header (A+, B+, Pi2, Pi3, Zero) and the compute module. This interface allows to connect parallel RGB displays to the Raspberry Pi GPIO either in RGB24 (8 bits for red, green and blue) or RGB666 (6 bits per color) or RGB565 (5 bits red, 6 green and 5 blue).

This mode is accompanied by new overlays, which allow to produce an RGB signal thanks to the VGA666 (get the 666 passive VGA adapter for Raspberry-Pi B+ : code and hardware).

configuring raspberry pi without tft display made in china

This screen is located on this site. Since overlays already exist for this display in the /boot/overlays directory, it will be supported with a simple configuration.

This screen uses the SPI bus to be driven. Its low resolution allows us to get a good frame rate in the emulation frequencies. Not really 60fps, but more than the minimum of 30 fps thanks to the modified fcbp program.

The SPI bus speed must be adjusted if you overclock your Raspberry Pi to get a good image. These settings have been tested on a Raspberry Pi1 at 1.1Ghz.

If you are using the GPIO controllers, you can instead change the GPIO pin configuration by using pin 4 or 5 to set the pin used, avoiding the pins used by your display. See here for details.

This 2.8" screen works well but may be too small and too expensive (35€) as far as Chinese clones are concerned. So let"s configure a 3.2" TFT screen from Waveshare that can be found on Banggood for less than 15€.

The screen is the following: a 3.2" TFT LCD touchscreen display module for the Raspberry Pi B+, B, A+. Its resolution is the same as the 2.8": 320x240. It is in fact a Waveshare screen.

Get the files waveshare35a-overlay.dtb and waveshare32b-overlay.dtb for the WaveShare 3.2" 320x240 display and the WaveShare 3.5" 320x480 display respectively. For the new version 4.4 kernels, we need to rename the dtb files to dtbo files to match the new overlay tree name. Rename waveshare35a-overlay.dtb to waveshare35a.dtbo and waveshare32b-overlay.dtb to waveshare32b.dtbo and copy them to the /boot/overlays directory.

If you are using the GPIO controllers, you can instead change the GPIO pin configuration by using pin 4 or 5 to set the pin used, avoiding the pins used by your display. See here for details.

This display cannot be used for arcade games with Recalbox. The SPI bus does not have enough bandwidth to handle this higher resolution of 480x320. If you increase the bus speed, the display becomes unstable (colors, flickering). During my tests, I could only get 20-25 FPS. This display is usable with an X server with a slow frame rate but not in arcade mode which requires a higher frame rate.

As described on this site, it is not recommended to use this screen for gaming. With twice as many pixels to push on the screen, the PiTFT 3.5" is significantly slower than its more compact brothers and we strongly advise against it for games. Now you know!

If you are using the GPIO controllers, you can instead change the GPIO pin configuration by using pin 4 or 5 to set the pin used, avoiding the pins used by your display. See here for details.

In my humble opinion, if you have the 3.5" (C) LCD for Raspberry Pi (480x320; 125Mhz), it should work, but with the 3.5" (B) LCD for Raspberry Pi (480x320; IPS), you won"t be able to get 60fps!

configuring raspberry pi without tft display made in china

The RPi LCD can be driven in two ways: Method 1. install a driver to your Raspbian OS. Method 2. use the Ready-to-use image file of which the LCD driver was pre-installed.

2) Connect the TF card to the PC, open the Win32DiskImager software, select the system image downloaded in step 1 and click‘Write’ to write the system image. ( How to write an image to a micro SD card for your Pi? See RPi Image Installation Guides for more details)

3) Connect the TF card to the Raspberry Pi, start the Raspberry Pi. The LCD will display after booting up, and then log in to the Raspberry Pi terminal,(You may need to connect a keyboard and HDMI LCD to Pi for driver installing, or log in remotely with SSH)

This LCD can be calibrated through the xinput-calibrator program. Note: The Raspberry Pi must be connected to the network, or else the program won"t be successfully installed.

Since the Raspberry Pi image and version are frequently updated, if you encounter a situation where the LCD cannot be used normally, please download the latest version of the image provided by us or from the official website of Raspberry Pi and install the latest driver provided by us.

When the Raspberry Pi starts normally, the PWR light is always on, and the ACT light is flashing. If it is found that both lights are always on, it may be that the TF card is not successfully programmed to the image or the TF card is in poor contact with the Raspberry Pi.

It is recommended to use a 5V 2.5A power adapter for the Raspberry Pi. If the Raspberry Pi is powered by the USB port of the PC, the Raspberry Pi may not be able to start normally due to an insufficient power supply.

configuring raspberry pi without tft display made in china

One thing I’ve learned over and over from working on the Raspberry Pi is that it’s most likely going to take a chunk of time to get things set up just the way you want.  And this display is no different.

I’ve written in the past about How to Play HD Video on a Raspberry Pi — so this is a continuation from a Raspbian Linux distribution image already in that state.  I was feeling lazy and didn’t want to write this post, but if I ever have to do this again I don’t want to have to google so many steps again.  So hopefully you’ll find this useful as well.

First I tried the instructions from here: Adafruit: Detailed Installation before realizing the available manual has an auto-configure option.  But I couldn’t get these working at first because the Debian package mirrors wouldn’t work so I had to modify my apt sources list to use some working mirrors. The download of the adafruit-pitft-helper package was still unavailable to me via apt but you can get it from Github.

You need to run this script adafruit-pitft-helper specifically to enable the console on your display.  The manual instructions on their website do not tell you how to do this, only for enabling the display for the graphical interface X11.  This script does the heavy lifting.

At this point the terminal is all set for your display.  Following this I will show you how to enable high definition video playback on your TFT display from the command line.  I won’t go into setting up the touchscreen for the X11 desktop, you can refer to the manual for that.  Personally I don’t think the Raspberry Pi makes a good desktop system as it’s slow, I much prefer the console.

If you try the omxplayer from the previous blog post you’ll find the video doesn’t show up on the display.  The reason is that it’s rendering on frame buffer 0 when the TFT is using frame buffer 1.  To get around this you need to use frame buffer copying with the fbcp program.  The instructions they provide are close but don’t follow the second modprobe command (as it messed up my display).

Now when you want to play a video you type omx myvideo.mp4 and it switches to frame buffer copying, plays the video given as the first parameter with omxplayer (taking advantage of GPU high speed graphics), after omxplayer exits fbcp is closed out with the killall command, we then clear the display of any visual artifacts left behind and we’re back to where we need to be with a nice looking display!

configuring raspberry pi without tft display made in china

We have used Liquid Crystal Displays in the DroneBot Workshop many times before, but the one we are working with today has a bit of a twist – it’s a circle!  Perfect for creating electronic gauges and special effects.

LCD, or Liquid Crystal Displays, are great choices for many applications. They aren’t that power-hungry, they are available in monochrome or full-color models, and they are available in all shapes and sizes.

Today we will see how to use this display with both an Arduino and an ESP32. We will also use a pair of them to make some rather spooky animated eyeballs!

There are also some additional connections to the display. One of them, DC, sets the display into either Data or Command mode. Another, BL, is a control for the display’s backlight.

The above illustration shows the connections to the display.  The Waveshare display can be used with either 3.3 or 5-volt logic, the power supply voltage should match the logic level (although you CAN use a 5-volt supply with 3.3-volt logic).

Another difference is simply with the labeling on the display. There are two pins, one labeled SDA and the other labeled SCL. At a glance, you would assume that this is an I2C device, but it isn’t, it’s SPI just like the Waveshare device.

This display can be used for the experiments we will be doing with the ESP32, as that is a 3.3-volt logic microcontroller. You would need to use a voltage level converter if you wanted to use one of these with an Arduino Uno.

The Waveshare device comes with a cable for use with the display. Unfortunately, it only has female ends, which would be excellent for a Raspberry Pi (which is also supported) but not too handy for an Arduino Uno. I used short breadboard jumper wires to convert the ends into male ones suitable for the Arduino.

Once you have everything hooked up, you can start coding for the display. There are a few ways to do this, one of them is to grab the sample code thatWaveshare provides on their Wiki.

The Waveshare Wiki does provide some information about the display and a bit of sample code for a few common controllers. It’s a reasonable support page, unfortunately, it is the only support that Waveshare provides(I would have liked to see more examples and a tutorial, but I guess I’m spoiled by Adafruit and Sparkfun LOL).

Open the Arduino folder. Inside you’ll find quite a few folders, one for each display size that Waveshare supports. As I’m using the 1.28-inch model, I selected theLCD_1inch28folder.

The error just seems to be with a couple of the Chinese characters used in the comments of the sketch. You can just ignore the error, the sketch will compile correctly in spite of it.

You can see from the code that after loading some libraries we initialize the display, set its backlight level (you can use PWM on the BL pin to set the level), and paint a new image. We then proceed to draw lines and strings onto the display.

After uploading the code, you will see the display show a fake “clock”. It’s a static display, but it does illustrate how you can use this with the Waveshare code.

This library is an extension of the Adafruit GFX library, which itself is one of the most popular display libraries around. Because of this, there isextensive documentation for this libraryavailable from Adafruit.  This makes the library an excellent choice for those who want to write their own applications.

As with the Waveshare sample, this file just prints shapes and text to the display. It is quite an easy sketch to understand, especially with the Adafruit documentation.

The sketch finishes by printing some bizarre text on the display. The text is an excerpt from The Hitchhiker’s Guide to the Galaxy by Douglas Adams, and it’s a sample of Vogon poetry, which is considered to be the third-worst in the Galaxy!

Here is the hookup for the ESP32 and the GC9A01 display.  As with most ESP32 hookup diagrams, it is important to use the correct GPIO numbers instead of physical pins. The diagram shows the WROVER, so if you are using a different module you’ll need to consult its documentation to ensure that you hook it up properly.

The TFT_eSPI library is ideal for this, and several other, displays. You can install it through your Arduino IDE Library Manager, just search for “TFT_eSPI”.

There is a lot of demo code included with the library. Some of it is intended for other display sizes, but there are a few that you can use with your circular display.

To test out the display, you can use theColour_Test sketch, found inside the Test and Diagnostic menu item inside the library samples.  While this sketch was not made for this display, it is a good way to confirm that you have everything hooked up and configured properly.

A great demo code sample is theAnimated_dialsketch, which is found inside theSpritesmenu item.  This demonstration code will produce a “dial” indicator on the display, along with some simulated “data” (really just a random number generator).

In order to run this sketch, you’ll need to install another library. Install theTjpeg_DecoderLibrary from Library Manager. Once you do, the sketch will compile, and you can upload it to your ESP32.

One of my favorite sketches is the Animated Eyes sketch, which displays a pair of very convincing eyeballs that move. Although it will work on a single display, it is more effective if you use two.

The first thing we need to do is to hook up a second display. To do this, you connect every wire in parallel with the first display, except for the CS (chip select) line.

The Animated Eyes sketch can be found within the sample files for the TFT_eSPI library, under the “generic” folder.  Assuming that you have wired up the second GC9A01 display, you’ll want to use theAnimated_Eyes_2sketch.

The GC9A01 LCD module is a 1.28-inch round display that is useful for instrumentation and other similar projects. Today we will learn how to use this display with an Arduino Uno and an ESP32.

configuring raspberry pi without tft display made in china

This is a 5" Raspberry Pi LCD touchscreen with 800*480 resolution and 108×64.8mm display area. The product supports Raspberry Pi DSI display interface and comes with a capacitive touch panel on its screen and supports 5 touch points.

The special holes design on the back of the screen is convenient to directly install the Raspberry Pi in the product. There is no need to provide external power for the touchscreen as the Raspberry Pi power supply is adopted. In addition, the screen supports hardware backlight adjustment. The function can be realized by turning the potentiometer on the back of the display.