Hi Team,
I acquire an Adafruit 320.240 pixel TFT Capacitative touchscreen and have configured it as per Adafruits instructions.
I don’t want to use it as a console.
I have managed to push a jpg to it using fbi and that works.
I’m now trying to write to it using Python3 and the pygame libraries.
My code doesn’t give any errors but instead of writing to the PiTFT - it pops up in a new Xwindo…
I understand pygame use the sdl and I think V1.2 is required.
I think I have SDL 1.2 installed.
Here’s the python code:
import pygame
import os
os.putenv(‘SDL_FBDEV’, ‘/dev/fb1’)
os.putenv(‘SDL_VIDEODRIVER’, ‘fbcon’)
pygame.init()
lcd = pygame.display.set_mode((320, 240))
lcd.fill((128,0,0,))
pygame.display.update()
pygame.mouse.set_visible(False)
lcd.fill((0,0,0))
pygame.display.update()
I am at a loss.
Any help would be much appreciated.
Pete