PiTFT 2.8 Resistive Screen


#1

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.

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 were: -

To turn the backlight off run

sudo sh -c 'echo "0" > /sys/class/backlight/soc\:backlight/brightness'

To turn it back on, run

sudo sh -c 'echo "1" > /sys/class/backlight/soc\:backlight/brightness'

Both of these commands now give the error message below.

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?

Any help/assistance is much appreciated.


#2

Best guess is, as I don’t own one, is it has to do with what Kernel your using now versus what Kernel was in use with the original install. Newer version (kernels) usually break those types of setups / displays.


#3

Ah I see! In that case I’ve managed to find an older raspbian stretch lite from 2017 in the official downloads folder I need to try it again as it didn’t want to boot. I thought it would due to the firmware on it as I’m using the screen on Rpi 1b (2 USB ports) but it works well for what I’m using it for!

Thanks for the response.


#4

Images can be downloaded from here, http://downloads.raspberrypi.org/raspbian/images/
The tricky part is sorting out which one you need. Any image that predates the release date of that model Pi, won’t boot on that Pi. A new release, with a new kernel, comes out to support a new model Pi release.


#5

How did it go Model A then Model B? Then A+ and B+ etc. Just about any version of Raspbian other than the very first release should boot on a (1) B I would think?

EDIT: Had a look at the install instructions you posted. Two different procedures for getting the back light working, depending on what kernel etc. Did you see that?


#6

Yes but neither of them worked both give same error!

It was working perfectly well on the pi 1 model b using raspbian stretch before.


#7

Yeah but which version / release of Stretch was it? ;)
Also, if your trying an earlier version “Do Not” do and update, upgrade. As that will update the kernel.


#8

The commands were still working to turn on and off the screen. Even after doing apt-get update && apt-get -y dist-upgrade

So I don’t think that was the issue.


#9

OK, not sure I can be of much more help. I’ve never used a GPIO connected screen with my Pi. I’ve been tempted to buy one of those Adafruit PiTFT screens just never pulled the trigger.

Have you tried posting on the Adafruit forum? I go by the same username there as well. ;)


#10

Yes sure I do appreciate you taking so much time to provide me with help and assistance. I sadly only got to spend 2 hours or so actually trying to fix the issue as I had to go to university today despite all the snow that suddenly arrived here in the U.K.!

I’ve stumbled upon a few full image backups I created tried a few but sadly they boot into emergency mode for some reason, these ones were some early backups but am trying the latest full image backup from 2018-06, fingers crossed this’ll work if so I’ll try find out what firmware is installed and the kernel it’s using, it’ll probably be a good idea to backup the /boot folder too.

I wasn’t aware there were adafruit forums I will try there next if this doesn’t work!


#11

So I have it working using an old backup using the commands I posted in the initial post.

[root@raspberrypi ~]$ uname -a
Linux raspberrypi 4.14.69+ #1141 Mon Sep 10 15:13:50 BST 2018 armv6l GNU/Linux

I believe the above is the linux kernel that it is using,

I’ve put the very same kernel on the latest raspbian stretch, but getting the same errors about the directory being nonexistant.

I’ve posted about it on the adafruit forums also, will see if any further help is given to get to the bottom of this!

https://forums.adafruit.com/viewtopic.php?f=50&t=147040


#12

Ok, sounds like you made some progress. I try to backup my cards as well. Especially stuff I spent a lot of time setting up etc.
Hopefully Adafruit can shed some light on what’s going on.