0

Problems using PiTFT 2.8 Resistive Screen
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/
Please be positive and constructive with your questions and comments.

Problems using PiTFT 2.8 Resistive Screen

by aeromaxx on Sat Feb 02, 2019 4:25 am

The story goes that I had a working screen that I was quite happily able to turn on and off via a cronjob, but then I broke something accidently, but no worries I had backups so nothing was lost, so I wiped the card and reinstalled raspbian stretch lite, this was what was on the card when I broke the install.

However despite putting raspbian stretch lite back on the card and installing the screen which does work partly as it did before I can’t turn the backlight off or back on.

https://learn.adafruit.com/adafruit-pit ... -gpio-11-5

The link above shows how to do the backlight control which was working perfectly fine, but on the new raspbian stretch lite it doesn’t.

The commands that I was using before that did work were: -

To turn the backlight off run

Code: Select all | TOGGLE FULL SIZE
sudo sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'
To turn it back on, run

Code: Select all | TOGGLE FULL SIZE
sudo sh -c 'echo "1" > /sys/class/backlight/soc\:backlight/brightness'
Both of these commands now give the error message below.

Code: Select all | TOGGLE FULL SIZE
sh: 1: cannot create /sys/class/backlight/soc:backlight/brightness: Directory nonexistent
Is there something missing from raspbian stretch perhaps that I need to install? Any idea what that might be?

When it was working before on raspbian stretch lite I was using the kernel of 4.14.69+, but putting this kernel into the raspbian stretch lite image doesn't make the above commands work.

Code: Select all | TOGGLE FULL SIZE
[root@raspberrypi ~]$ uname -a
Linux raspberrypi 4.14.69+ #1141 Mon Sep 10 15:13:50 BST 2018 armv6l GNU/Linux
Any help/assistance is much appreciated.

aeromaxx
 
Posts: 2
Joined: Mon Jan 15, 2018 12:46 pm

Re: Problems using PiTFT 2.8 Resistive Screen

by adafruit_support_mike on Sat Feb 02, 2019 6:12 am

Yeah, Stretch changed the whole interface to the GPIO pins from a memory-mapped file interface in the /sys file tree to a daemon.

Now they prefer to have everyone use the GPIO Zero interface in Python:

https://gpiozero.readthedocs.io/en/stable/

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

Please be positive and constructive with your questions and comments.