How to drive DFR0928 display from linux based system

I have bought a DFR0928 1.8" display (it also has an SD card slot but that is just an extra). I am trying to drive it from a Raspberry Pi running Raspbian (ie Ubuntu).

The hardware side was very simple and not a problem. However I am having a small problem getting the software to work correctly.

The display is driven from the ST7735 chip. Ubuntu has a driver for this called adafruit18-st7735r. I have added the line “dtoverlay=adafruit-st7735r” to my /boot/config.txt file. When the Pi boots, I can see the boot logging scrolling up it correctly, so it is basically working ok.

My problem is that the frame buffer is offset by a couple of pixels in both the horizontal and vertical directions. How can I correct this? Or is there another driver I should be using?

Any help appreciated.

Using the display as a framebuffer is possible, but it is not advisable (too tiny to read anything in console-mode, too small for X-windows).

The better solution is to write to the display directly from your application. If you google around, you will find e.g. python libs that use PIL. Very simple to use.

My plan isn’t really to use it as a console but using the frame buffer approach allows me to use standard graphics libraries for creating a custom display.

Driving the display directly will entail a lot more work, possibly requiring me to basically write my own graphics library.

I agree. But keep in mind that from any graphics-library you will most probably only be able to use drawing primitives. Any higher-level widgets are typically targeted at larger screens. But you could use very special libs like QT-embedded.

Regarding the second option: writing your own graphics-library is only necessary if you don’t want to use one of the available ones (e.g. because you need C/C++).

But back to your original question: many ST7735-screens need an offset. You should search the web for your overlay. Many overlays have parameters. But maybe Adafruit has baked in the offset specifically for their display. In this case, you need to adapt the source-code.