0

Adafruit Mini PiTFT 1.3" - 240x240 TFT - static on screen
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit Mini PiTFT 1.3" - 240x240 TFT - static on screen

by pgerken on Mon Jun 07, 2021 2:12 pm

I bought 2 of these Adafruit Mini PiTFT 1.3" - 240x240 TFT displays: https://www.adafruit.com/product/4484 and tried them out on a Pi Zero W and Pi 3 A+.

When I run the stats.py code on the display, it shows the text off center and has static around the text as seen in the attached photos.

Did I get two bad displays? Or is there some more config I need to do?

Thanks!

Pete
Attachments
IMG_4397.jpg
Pi Zero W with display
IMG_4397.jpg (101.55 KiB) Viewed 246 times
IMG_4398.jpg
PI 3 A+ with display
IMG_4398.jpg (124.46 KiB) Viewed 246 times

pgerken
 
Posts: 3
Joined: Mon Jun 07, 2021 1:42 pm

Re: Adafruit Mini PiTFT 1.3" - 240x240 TFT - static on scree

by pgerken on Mon Jun 07, 2021 3:04 pm

I fixed my own problem.. but still have another question...

I was able to modify the python code to display correctly on the 240x240 display.... however I had to change the x, y offset from 50, 43 to 0, 80... why is it 80????

pi@raspberrypi:~/install-scripts/adafruit-1.3 $ diff stats.py.orig stats.py
32c32
< width=135,
---
> width=240,
34,35c34,35
< x_offset=53,
< y_offset=40,
---
> x_offset=0,
> y_offset=80,
86c86
<
---
>
98c98,101
<
---
> y += font.getsize(Disk)[1]
> y += font.getsize(Disk)[1]
> draw.text((x, y), 'Fixed!', font=font, fill="#FFFFFF")
>
Attachments
IMG_4399.jpg
IMG_4399.jpg (122.08 KiB) Viewed 239 times

pgerken
 
Posts: 3
Joined: Mon Jun 07, 2021 1:42 pm

Re: Adafruit Mini PiTFT 1.3" - 240x240 TFT - static on scree

by adafruit_support_mike on Tue Jun 08, 2021 10:56 pm

It's probably an artifact of the coordinate system. Draw a set of lines with offsets of 5, 10, 20, and 50.

adafruit_support_mike
 
Posts: 63053
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.