Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

pi 3 B+ with pitft plus 2.8
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

pi 3 B+ with pitft plus 2.8

by tysonnorris on Sun Sep 06, 2020 7:08 pm

Hi -
I'm trying to setup a pitft plus 2.8 resistive screen (only care about the display, not the touch, fwiw) on a recent raspbian lite (buster) os. This is a headless setup, no X11, to use frame buffer to display images etc.

Setup based on https://learn.adafruit.com/adafruit-pit ... -install-2 seems to go ok, I end with with the following in my /boot/config.txt:
Code: Select all | TOGGLE FULL SIZE
# --- added by adafruit-pitft-helper Sun  6 Sep 23:20:43 BST 2020 ---
hdmi_force_hotplug=0
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft28-resistive,rotate=90,speed=64000000,fps=30
# --- end adafruit-pitft-helper Sun  6 Sep 23:20:43 BST 2020 ---


But if I run fbi to display an image, I just get a white screen

Does anyone have advice for getting this tft running on raspbian buster without gui?

Thanks!

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by tysonnorris on Mon Sep 07, 2020 9:42 pm

FWIW, I tries the same with a pristine raspbian lite stretch image (was using latest buster image before) as well, with the same results.

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by mikeysklar on Wed Sep 09, 2020 2:37 pm

I take it you are getting a successful console boot, but when you display images using the following syntax you get a white screen?

Code: Select all | TOGGLE FULL SIZE
sudo fbi -T 2 -d /dev/fb1 -noverbose -a adapiluv320x240.jpg


Does this resolve the issue?

Code: Select all | TOGGLE FULL SIZE
apt-get install -y bc fbi git python-dev python-pip python-smbus python-spidev evtest libts0 libts-bin 1> /dev/null || { warning "Apt failed to install software!" && exit 1; }


I think we had everything working during the Pi OS STRETCH release and TSLIB and other related components are now ready for an update with the multiple buster releases this year.

mikeysklar
 
Posts: 1665
Joined: Mon Aug 01, 2016 8:10 pm

Re: pi 3 B+ with pitft plus 2.8

by tysonnorris on Wed Sep 09, 2020 11:58 pm

The pi will boot, and I can ssh to it, but nothing on the screen - the console messages do not show there, I have tried the setup script to show console on the tft, and not show anything on the tft, nothing on the tft in both cases, and using fbi also doesn't show anything.

I do see a flash - maybe from darker to lighter? - when first running either fbi or pygame to draw something, but no image ever displays.

I will try the install you mention and see what happens.
Thanks

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by tysonnorris on Thu Sep 10, 2020 12:26 am

No luck - running the fbi command just causes the screen to go white.
I ran the install mentioned, and verified all the packages are installed, and rebooted.
Thanks

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by mikeysklar on Thu Sep 10, 2020 1:58 pm

Hi tysonmorris,

Since you are not getting any console on the PiTFT plus let's backup a step and go back to the adafruit-pitft.sh script. Could you re-run that script, but proceed it with the `script` command so we can see all the output it generates.

Code: Select all | TOGGLE FULL SIZE
sudo script adafruit-pitft.sh


(press ctrl-D when finished to save the session to a file)

I suspect that the '/boot/config.txt' changes you have made. Re-running the easy install script will override those. Also I am concerned about errors being thrown when adafruit-pitft.sh is running and we will want to capture that.

mikeysklar
 
Posts: 1665
Joined: Mon Aug 01, 2016 8:10 pm

Re: pi 3 B+ with pitft plus 2.8

by tysonnorris on Fri Sep 11, 2020 11:35 am

The "script" capture only saved the first iteractive portion of the adafruit-pitft.sh script, but here's the whole thing from my ssh session:

Code: Select all | TOGGLE FULL SIZE
This script downloads and installs
PiTFT Support using userspace touch
controls and a DTO for display drawing.
one of several configuration files.
Run time of up to 5 minutes. Reboot required!

Select configuration:
1. PiTFT 2.4", 2.8" or 3.2" resistive (240x320)
2. PiTFT 2.2" no touch (240x320)
3. PiTFT 2.8" capacitive touch (240x320)
4. PiTFT 3.5" resistive touch (320x480)
5. PiTFT Mini 1.3" or 1.54" display (240x240) - WARNING! WILL UPGRADE YOUR KERNEL TO LATEST
6. MiniPiTFT 1.14" display (240x135) - WARNING! WILL UPGRADE YOUR KERNEL TO LATEST
7. ST7789V 2.0" no touch (240x320) - WARNING! WILL UPGRADE YOUR KERNEL TO LATEST
8. Uninstall PiTFT
9. Quit without installing

SELECT 1-9: 1
Select rotation:
1. 90 degrees (landscape)
2. 180 degrees (portrait)
3. 270 degrees (landscape)
4. 0 degrees (portrait)

SELECT 1-4: 1
[PITFT] Checking init system...
Found systemd
/boot is mounted
[PITFT] System update
Updating apt indexes...
...
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

......
Reading package lists...
.........
[PITFT] Installing Python libraries & Software...
Installing Pre-requisite Software...This may take a few minutes!
[PITFT] Updating /boot/config.txt...
Already have an adafruit-pitft-helper section in /boot/config.txt.
Removing old section...
[PITFT] Updating SysFS rules for Touchscreen...
[PITFT] Updating TSLib default calibration...
Would you like the console to appear on the PiTFT display? [y/n] y
[PITFT] Updating console to PiTFT...
Remove fbcp from /etc/rc.local, if it's there...
Failed to disable unit: No such file or directory
Configuring boot/config.txt for default HDMI
Set up main console turn on
/boot/cmdline.txt already updated
Turning off console blanking
Setting raspi-config to boot to console w/o login...
[PITFT] Success!

Settings take effect on next boot.

REBOOT NOW? [y/N] y
Reboot started...


and here is /boot/config.txt

Code: Select all | TOGGLE FULL SIZE
pi@raspberrypi:~ $ cat /boot/config.txt
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=0

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=0

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-fkms-v3d
# --- added by adafruit-pitft-helper Fri 11 Sep 16:14:21 BST 2020 ---
hdmi_force_hotplug=0
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft28-resistive,rotate=90,speed=64000000,fps=30
# --- end adafruit-pitft-helper Fri 11 Sep 16:14:21 BST 2020 ---
dtoverlay=vc4-fkms-v3d


I haven't made any changes to /boot/config.txt (other than changes made by the adafruit-pitft.sh script).
I did verify that spi is enabled in raspi-config and rebooted to retry fbi, but same result - just a white screen.

Thanks

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by mikeysklar on Mon Sep 14, 2020 4:33 pm

Thank you for getting the logs. I figured script would be complicated by sudo and another script so good idea to just script the entire SSH session. You are answering the scripted question correctly about getting the console on the PiTFT.

Your best option here should be a Raspbian Lite. Is that what you have installed now?

Have you set the Pi to boot to console in raspi-config? There is a white line that will appear if it is still set to 'boot to X'.

I do see another SPI speed setting and frame rate option in our FAQ you could try if the above is not working.

Code: Select all | TOGGLE FULL SIZE
dtoverlay=pitft28r,rotate=90,speed=62000000,fps=25


I assume the ribbon connector on your board look good. Although pushed in with the black ear locks being secured?

raspberry_pi_Ears.png
raspberry_pi_Ears.png (532.91 KiB) Viewed 15 times

mikeysklar
 
Posts: 1665
Joined: Mon Aug 01, 2016 8:10 pm

Re: pi 3 B+ with pitft plus 2.8

by cntrlengr on Tue Sep 15, 2020 12:13 pm

I am new to Raspberry Pi and Python and all that...but have decided to take it on for a school project. For my project, I need the HDMI to be a mirror of the PiTFT when it is plugged in. Currently, the desktop is visible and usable on the 2.8 LCD but the only thing on the HDMI output is the "Welcome to PIXEL" Raspberry Pi Logo. It shows some boot up stuff and services at the bottom during boot...currently it shows "rc-local.service". I have tried several OS revisions and config .txt iterations. Was hoping to sneak in here and see if someone has an idea? Currently, the only OS image that I could get to have the LCD work (not just a white screen) is the one downloaded from Adafruit Named "2016-10-18-pitft-28r.zip" image.

cntrlengr
 
Posts: 1
Joined: Tue Sep 15, 2020 12:04 pm

Re: pi 3 B+ with pitft plus 2.8

by mikeysklar on Tue Sep 15, 2020 5:15 pm

Hello cntrlengr,

Please open up a new thread for this topic as mirroring and your setup are slightly different.

mikeysklar
 
Posts: 1665
Joined: Mon Aug 01, 2016 8:10 pm

Re: pi 3 B+ with pitft plus 2.8

by tysonnorris on Wed Sep 16, 2020 12:01 am

Thanks @mikeysklar

I tried enabling console in raspi-config, as well as the dtoverlay example, no luck.

This is using raspian lite (stretch). I had previously tried buster, but went back to stretch to see if there was any difference.

FWIW, I was able to use the below code to draw to another (different) ili9341 tft screen on the same rpi 3, with different pins (wired with individual pin connectors, not a 2x20 connector). I don't really need to display the console, but have been trying that to establish if I can get this display to work.

I'm not sure which pins to use for the pitft - but the schematic seems to indicate it should use CS: CE0, DC: GPIO25, RST: GPIO24.
I'm also not sure though that the `adafruit_rgb_display.ili9341` module works with CE0 on rpi (per https://learn.adafruit.com/circuitpytho ... rs-devices), so this library may not be a good example for this screen?

In any case, I got the same behavior though - just a white screen - there is still a flash when program runs, similar to when I use fbi to try to display an image.

I also did verify the ribbon connector seems ok - I also reseated the cable (after unlocking the ear locks) to see if it was lose, but no difference.

Thanks
Tyson


Code: Select all | TOGGLE FULL SIZE
 
import adafruit_rgb_display.ili9341 as ili9341

CS_PIN =board.CE0
DC_PIN = board.D25
RST_PIN = board.D24



# Setup SPI bus using hardware SPI:
spi = busio.SPI(clock=SCK, MOSI=MOSI, MISO=MISO)

# Create the ILI9341 display:
display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(CS_PIN),
                          dc=digitalio.DigitalInOut(DC_PIN),
                          rst=digitalio.DigitalInOut(RST_PIN))

tysonnorris
 
Posts: 6
Joined: Sun Sep 06, 2020 7:01 pm

Re: pi 3 B+ with pitft plus 2.8

by mikeysklar on Wed Sep 16, 2020 1:21 pm

Tyson,

Please review your manual wiring with the appropriate schematics. Here is the 2.8 PiTFT Plus schematic for a 2x20 Pi. You can see how the CE0 and CE1 are tied to TFT_DC and TFT_CS in this case.

https://learn.adafruit.com/adafruit-pit ... #downloads

pitft-2.8-plus-sch.png
pitft-2.8-plus-sch.png (56.5 KiB) Viewed 3 times


I'm not sure which ili9341 TFT model you are using. We have at elast two sizes (2.8" & 3.2") sizes and resistive vs capacitve. interfaces.

We have examples of wiring up this screen with a Pi:

https://learn.adafruit.com/adafruit-2-8 ... -and-setup

These displays are set up to use the 8-bit data lines by default. We want to use them for SPI. To do that, you'll need to either solder bridge some pads on the back or connect the appropriate IM lines to 3.3V with jumper wires. Check the back of your display for the correct solder pads or IM lines to put it in SPI mode.

Vin connects to the Raspberry Pi's 3V pin
GND connects to the Raspberry Pi's ground
CLK connects to SPI clock. On the Raspberry Pi, thats SLCK
MOSI connects to SPI MOSI. On the Raspberry Pi, thats also MOSI
CS connects to our SPI Chip Select pin. We'll be using CE0
D/C connects to our SPI Chip Select pin. We'll be using GPIO 25, but this can be changed later.
RST connects to our Reset pin. We'll be using GPIO 24 but this can be changed later as well.


28-tft-ili-pi.jpg
28-tft-ili-pi.jpg (86.72 KiB) Viewed 3 times

mikeysklar
 
Posts: 1665
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.