Giter VIP home page Giter VIP logo

fbcp's Introduction

fbcp (frame buffer copy)

Provides fbcp driver for SPI based displays for Raspberry Pis via fbcp-ili9341

Supported Displays

fbcp-ili9341 supports several displays but we have compiled controllers for

Display Tag Tested Tested On
Adafruit PiTFT - Assembled 480x320 3.5" TFT+Touchscreen for Raspberry Pi adafruit-hx8357d-pitft 3B+
Adafruit 2.8" 320x240 TFT w/ Touch screen for Raspberry Pi adafruit-ili9341-pitft
Adafruit PiTFT 2.2" HAT Mini Kit - 320x240 2.2" TFT - No Touch adafruit-ili9341-pitft
Freeplay CM3 DIY Kit freeplaytech-waveshare32b
Waveshare 3.5" 480x320 (ILI9486) waveshare35b-ili9486
Tontec 3.5" 320x480 LCD Display tontec-mz61581
Waveshare 240x240, 1.3inch IPS LCD display HAT for Raspberry Pi (ST7789VW) waveshare-st7789vw-hat
Waveshare 128x128, 1.44inch LCD display HAT for Raspberry Pi (ST7735S) waveshare-st7735s-hat
KeDei 3.5 inch SPI TFTLCD 480*320 16bit/18bit version 6.3 2018/4/9 kedei-v63-mpi3501
Generic rpi-fbcp using BALENA_HOST_CONFIG_dtoverlay for drivers dtoverlay 3B+

Usage

fbcp is meant to be used alongside other services, so you will need to create a service in your docker-compose.yml file:

So for example, if you are using fbcp with the Adafruit PiTFT - Assembled 480x320 3.5" TFT+Touchscreen along with the dashboard and browser blocks with a Raspberry Pi 3, you would use the following docker-compose.yml file

version: "2.1"

services:
  fbcp:
    image: bh.cr/balenalabs/fbcp
    privileged: true
  ...

Then set the FBCP_DISPLAY environment variable. e.g FBCP_DISPLAY=adafruit-hx8357d-pitft

⚠️ Touch compatibility ⚠️

fbcp block includes two drivers, namely

  • tasanakorn/rpi-fbcp which has touch support and is used when FBCP_DISPLAY=dtoverlay. You will still need to set the proper dtoverlay driver and params.
  • juj/fbcp-ili9341 which does not have touch support. See here

Configuring HDMI and TFT display sizes

The following Device Configuration variables might be required for proper scaling and resolutions:

Name Value
BALENA_HOST_CONFIG_hdmi_cvt <width> <height> <framerate> <aspect> <margins> <interlace> <rb> e.g 480 320 60 1 0 0 0
BALENA_HOST_CONFIG_hdmi_force_hotplug 1
BALENA_HOST_CONFIG_hdmi_group 2
BALENA_HOST_CONFIG_hdmi_mode 87

These lines hint native applications about the default display mode, and let them render to the native resolution of the TFT display. This can however prevent the use of the HDMI connector, if the HDMI connected display does not support such a small resolution.

You can read more about these settings in the original fbcp-ili9341 documentation here.

fbcp's People

Contributors

balena-ci avatar klutchell avatar nucleardreamer avatar rahul-thakoor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

megankde

fbcp's Issues

The touch screen is rotated but the image on the screen is not.

Hi, I have a little problem.
The screen has the axis of the touch reversed when I have it in "display_rotate = 0" but when I have "display_rotate = 1" it doesn't happen but I want it in "display_rotate = 0".

I have given permission to support for accesing my device.

I'm sorry if my English is not very good but it is because I live in Spain and I don't know much English and I am using google translator

Example on how to use tasanakorn/rpi-fbcp

Could it be possible to add few examples on how to use the rpi-fbcp driver and custom overlays. Currently this seems to be the only way to get the touchscreen working for SPI displays (juj/fbcp-ili9341 does not have touch support).

Display does not fit screen

I have fbcp-ili9341 running successfully for the most part, I got rid of the statisitic data and I have the screen orientated correctly, however, I can't get the display to fit the screen. Any ideas?
This what I get when I run it:
bcm_host_get_peripheral_address: 0xfe000000, bcm_host_get_peripheral_size: 25165824, bcm_host_get_sdram_address: 0xc0000000 BCM core speed: current: 333333333hz, max turbo: 500000000hz. SPI CDIV: 30, SPI max frequency: 16666667hz Allocated DMA channel 7 Allocated DMA channel 1 Enabling DMA channels Tx:7 and Rx:1 DMA hardware register file is at ptr: 0xb532d000, using DMA TX channel: 7 and DMA RX channel: 1 DMA hardware TX channel register file is at ptr: 0xb532d700, DMA RX channel register file is at ptr: 0xb532d100 Resetting DMA channels for use DMA all set up Initializing display Resetting display at reset GPIO pin 24 Creating SPI task thread InitSPI done DISPLAY_FLIP_ORIENTATION_IN_SOFTWARE: Swapping width/height to update display in portrait mode to minimize tearing. Relevant source display area size with overscan cropped away: 768x1360. Source GPU display is 768x1360. Output SPI display is 240x240 with a drawable area of 240x240. Applying scaling factor horiz=0.18x & vert=0.18x, xOffset: 52, yOffset: 0, scaledWidth: 136, scaledHeight: 240 Creating dispmanX resource of size 136x240 (aspect ratio=0.566667). GPU grab rectangle is offset x=0,y=0, size w=136xh=240, aspect ratio=0.566667 All initialized, now running main loop...
20201002_101445

Document gpu_mem

Failed to allocate GPU memory! Try increasing gpu_mem allocation in /boot/config.txt. See https://www.raspberrypi.org/documentation/configuration/config-txt/memory.md

use with custom dtoverlay (rotate, speed, fps)

How should I support a screen where I also have custom dtoverlay values?

RESIN_HOST_CONFIG_dtoverlay=pitft35-resistive,rotate=90,speed=25000000,fps=20

I got as far as using the generic balenablocks/fbcp and setting FBCP_DISPLAY=pitft35-resistive but I'm not sure how to achieve my other settings? Or is it expected to have both the device config and the env var set?

I realized that the balena-pihole repo currently does not have any instructions for enabling screens (intentionally) and just links to a related blog post. If I can figure out how to use this block I may just link to this repo instead :)

RPi4 needs default DT overlay

RPi4 displays nothing on my Adafruit 2.8" TFT, until I set the DT overlay back to "vc4-fkms-v3d".

Should we detect the device type and twiddle the overlay if it's a Pi4 @rahul-thakoor ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.