Currently I'm using this code, to display my pygame on 2.8" TFT with Touchscreen while keeping the HDMI-Port as main-output:
import pygame, sys, os os.environ["SDL_VIDEODRIVER"] = "fbcon" os.environ["SDL_FBDEV"] = "/dev/fb1" os.environ["SDL_MOUSEDRV"] = "TSLIB" os.environ["SDL_MOUSEDEV"] = "/dev/input/touchscreen"
Is there a way to create a container, something similar to
Rect in Pygame, that is able to display the pi-camera preview?
When I use:
cam = picamera.PiCamera() cam.resolution = (220,140) cam.start_preview()
My application is still displayed on the TFT, but the Camera-Feed is displayed on the HDMI-Output on-top of bash.