I am using a PiTFT 2.8" on an original Raspberry Pi B. I just reinstalled Raspbian and setup the PiTFT using the Adafruit easy install script to launch to console.

I have a python script that communicates using serial via USB on /dev/ttyUSB0. My script only runs correctly and accesses the USB port when an HDMI cable is plugged in. (If I unplug the HDMI, it won't communicate over serial; if I plug it in, it does.) I assume this has to do with a setting in /boot/config.txt, but I can't figure out which.

Here is 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

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

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

# uncomment to force a console size. By default it will be display's size minus
# overscan.

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

# uncomment to force a specific HDMI mode (this will force VGA)

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

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

# uncomment for composite PAL

#uncomment to overclock the arm. 700 MHz is the default.

# Uncomment some or all of these to enable the optional hardware interfaces

# Uncomment this to enable the lirc-rpi module

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

# Enable audio (loads snd_bcm2835)

# --- added by adafruit-pitft-helper Wed May 15 16:54:04 CDT 2019 ---

Any help is much appreciated.

  • why are you assuming that the problem is with config.txt? .... your script is also suspect – jsotola May 16 at 3:05
  • The script only sends commands using pyserial. It works on headless Rasberry pi units and it works with this unit while HDMI is disconnected. – afikomen May 16 at 13:49
  • your post says the opposite, it communicates when the HDMI cable is connected – jsotola May 19 at 2:37
  • Yes. That was a typo. My apologies. The script only sends commands using pyserial. It works on headless Rasberry pi units and it doesn't work with this unit while HDMI is disconnected. – afikomen Jun 6 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.