Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

A big problem with Adafruit touchscreen

Fri May 15, 2015 11:19 pm

Hi,
on my birthday back in march I got a adafruit PID #1601 (touch screen)
I tried the easy install but it did not work so...
I followed their DIY install script here https://learn.adafruit.com/adafruit-pit ... sy-install
I ssh into my rpi to do what it said. This is what I first typed in (like it said)

Code: Select all

curl -SLs https://apt.adafruit.com/add | sudo bash
That work all fine and dandy with the adafruit logo made out of text
but the strange thing is when I typed the next bit in

Code: Select all

sudo apt-get install -y adafruit-pitft-helper
it only took about 45 seconds. The instructions said it would take about 20 min! well I just went on any ways but when finished the other steps I rebooted my rpi (through ssh) like it said to do, the screen was plain white!
I then decided to follow the detailed instructions to try to pin point the problem.
https://learn.adafruit.com/adafruit-pit ... stallation
I passed this part with out any problems.
OK since you're not going to run the helper, lets add the device tree overlay manually. Edit /boot/config.txt with
sudo nano /boot/config.txt
and add the following lines at the end:

Code: Select all

[pi1]
device_tree=bcm2708-rpi-b-plus.dtb
[pi2]
device_tree=bcm2709-rpi-2-b.dtb
[all]
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c_arm=on
dtoverlay=pitft28r,rotate=90,speed=32000000,fps=20
It was already there so I did not have to do anything.
the next thing said this
Run the following commands to startx on the /dev/fb1 framebuffer, a.k.a PiTFT screen:

Code: Select all

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
export FRAMEBUFFER=/dev/fb1
startx
but when I typed this in

Code: Select all

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
it said
mv: cannot stat `/usr/share/X11/xorg.conf.d/99-fbturbo.conf': No such file or directory
So I am thinking that probably something went hay wire with the kernel install. Could someone that is more knowledgeable with this help me.

Note:I am only 14 so please excuse my ignorance that I have at moments :roll: :D

User avatar
electronicsguy
Posts: 156
Joined: Wed Jan 21, 2015 11:20 pm
Contact: Website

Re: A big problem with Adafruit touchscreen

Fri May 15, 2015 11:46 pm

Try this:

sudo apt-get update && sudo apt-get install xserver-xorg-video-fbturbo

This will install that package if you don't have it installed already. Let us know the output from this.
if everything is ok, try your previous command again.
blog: https://electronicsguy.wordpress.com
github: https://github.com/electronicsguy

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Sat May 16, 2015 1:33 am

electronicsguy wrote:Try this:

sudo apt-get update && sudo apt-get install xserver-xorg-video-fbturbo

This will install that package if you don't have it installed already. Let us know the output from this.
if everything is ok, try your previous command again.
It said I already have xserver-xorg-video-fbturbo. I tried this again but it didn't work

Code: Select all

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
It said this
mv: cannot stat `/usr/share/X11/xorg.conf.d/99-fbturbo.conf': No such file or directory
I was curious so I did this

Code: Select all

cd /usr/share/X11/xorg.conf.d/
And it was valid. there was a folder by that name. I then used ls to see what was in it and this is what came up

Code: Select all

[email protected] /usr/share/X11/xorg.conf.d $ ls
10-evdev.conf  50-synaptics.conf
I don't know if that will help but I thought I would let you know anyways

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Sat May 16, 2015 10:02 am

So can I not use it then? Why can't I get all of the kernel installations? Can someone please help. Thank you in advance if you do.

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Sat May 16, 2015 10:54 am

Malman35 wrote:So can I not use it then? Why can't I get all of the kernel installations? Can someone please help. Thank you in advance if you do.
@Malman35 where do you want to go from here? You appear to be in a bit of a mess.

The sad thing is that the driver for the "Adafruit PiTFT 2.8" resistive touch screen" is now a part of the kernel that comes with Raspbian. It would be nice if Adafruit updated their instructions.

So you really need to make a choice! Either try to fix up your current system or start again with a fresh copy of the operating system.

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Sat May 16, 2015 12:48 pm

AndyD wrote:
Malman35 wrote:So can I not use it then? Why can't I get all of the kernel installations? Can someone please help. Thank you in advance if you do.
@Malman35 where do you want to go from here? You appear to be in a bit of a mess.

The sad thing is that the driver for the "Adafruit PiTFT 2.8" resistive touch screen" is now a part of the kernel that comes with Raspbian. It would be nice if Adafruit updated their instructions.

So you really need to make a choice! Either try to fix up your current system or start again with a fresh copy of the operating system.
I could start again. I haven't done anything but to try to set up the screen. But if I did start from scratch what would I do then? Could someone give some detailed instructions (I am not very good at assuming what people mean ;) ) since apparently the adafruit instructions were not up to date BTW I was using noobs.

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Sat May 16, 2015 1:16 pm

Malman35 wrote:I haven't done anything but to try to set up the screen. But if I did start from scratch what would I do then? Could someone give some detailed instructions (I am not very good at assuming what people mean ;) ) since apparently the adafruit instructions were not up to date BTW I was using noobs.
OK, you appear to be comfortable making changes to the config.txt. So, starting from a fresh copy of NOOBS you would do the following.

1) Edit config.txt and add the line. Then reboot.

Code: Select all

dtoverlay=pitft28-resistive,rotate=90
2) Assuming you have not set the Raspberry Pi to boot into the desktop. Log into the Raspberry Pi using a keyboard and mouse (That is don't try the following via SSH).

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
If that works, we can look at setting up the touch screen etc.

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Sun May 17, 2015 8:56 am

AndyD wrote:starting from a fresh copy of NOOBS you would do the following.

1) Edit config.txt and add the line. Then reboot.

Code: Select all

dtoverlay=pitft28-resistive,rotate=90
I was able to do that fine with no problem
AndyD wrote: 2) Assuming you have not set the Raspberry Pi to boot into the desktop. Log into the Raspberry Pi using a keyboard and mouse (That is don't try the following via SSH).

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
If that works, we can look at setting up the touch screen etc.
Well in short, it did not work. Here is the details. I did what you said to type in but nothing came up on the small screen and so I then plugged in my monitor to make sure i typed it in right and sure enough i did. The desktop was enlarged (like it would look on my TFT screen) but on my HDMI monitor! I then rebooted my pi to see if that would work but it did not. instead when I typed

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
it looked normal. the desktop was not enlarged. so I am kinda baffled by this whole ordeal. I hope there is a way to get it working because my parents would be disappointed to know it is just sitting around (not to mention my disappointment ;) ) Thanks for the feedback AndyD

BTW I did not SSH

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
I just blindly typed it in.

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Sun May 17, 2015 9:57 am

OK lets start trouble shooting. Can you try the following commands (doesn't matter how you log in SSH would be fine) and post the results

Code: Select all

dmesg | grep fbtft
and

Code: Select all

ls -l /dev/fb1

notro
Posts: 693
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: A big problem with Adafruit touchscreen

Sun May 17, 2015 8:02 pm

I use con2fbmap when I test fbtft:

Code: Select all

$ con2fbmap 1
console 1 is mapped to framebuffer 0
$ con2fbmap 1 1
$ con2fbmap 1
console 1 is mapped to framebuffer 1
$ con2fbmap 1 0
$ con2fbmap 1
console 1 is mapped to framebuffer 0
This will put the console on the tft display (/dev/fb1), and it always works out of the box.
Here's some X windows info: https://github.com/notro/fbtft/wiki/FBT ... -x-windows

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Mon May 18, 2015 12:06 am

Before I post the results I should let you know that when I plugged my rpi I am using with the screen in i also plugged in my moniter to make sure i put my password and stuff in. The interesting thing was that the text on the screen was much bigger like it would be on my tft touch screen. Just thought I would let you know since it was the first time it did that.
AndyD wrote:

Code: Select all

dmesg | grep fbtft
Nothing happened. My tft touchscreen was still blank white and no text came up in command line. I have no clue how this is of any use but if what I told you can help you figure it out well then I am glad to do it.
AndyD wrote:

Code: Select all

ls -l /dev/fb1
this is what is said when I put that in
ls: cannot access /dev/fb1: No such file or directory
I hope that helps you out in trying to figure out the problem. Thanks again AndyD

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Mon May 18, 2015 12:55 pm

Malman35 wrote:
AndyD wrote:

Code: Select all

ls -l /dev/fb1
this is what is said when I put that in

Code: Select all

ls: cannot access /dev/fb1: No such file or directory
OK well that is a problem. It means that the driver isn't loaded.

Just to be clear:-
  • you are now working with a newly re-imaged version of Raspbian (or NOOBS). Is that correct?
  • Is this the latest Raspbian or NOOBS image from the download page or an older image?
  • You added the line "dtoverlay=pitft28-resistive,rotate=90" to the config.txt file
Also, are you using NOOBS? I only ask so that I can be clearer in the instructions I give.

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Mon May 18, 2015 1:22 pm

AndyD wrote:
  • you are now working with a newly re-imaged version of Raspbian (or NOOBS). Is that correct?
Yes
AndyD wrote: [*]Is this the latest Raspbian or NOOBS image from the download page or an older image?
I got a brand new copy of NOOBS from the RPI downloads page.
AndyD wrote: [*]You added the line "dtoverlay=pitft28-resistive,rotate=90" to the config.txt file[/list]
Yes I did.
AndyD wrote: Also, are you using NOOBS? I only ask so that I can be clearer in the instructions I give.
I am using NOOBS and I chose the rasbian on the start up menu selection

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Mon May 18, 2015 1:44 pm

@Malman35 the strange thing is if I don't have an Adafruit TFT display. If I add "dtoverlay=pitft28-resistive,rotate=90" to my config.txt file I get a device create

Code: Select all

ls -l /dev/fb1
crw-rw---T 1 root video 29, 1 May 18 23:39 /dev/fb1
and I get the following message from dmesg

Code: Select all

dmesg | grep fbtft
[    5.576901] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    5.763404] fbtft_of_value: buswidth = 8
[    5.803512] fbtft_of_value: debug = 0
[    5.873827] fbtft_of_value: rotate = 90
[    5.935210] fbtft_of_value: fps = 25
One thing worth trying. Edit the file /etc/modprobe.d/raspi-blacklist.conf and comment out the line

Code: Select all

blacklist spi-bcm2708
change it to

Code: Select all

# blacklist spi-bcm2708
and then reboot (and check the dmesg output and if the /dev/fb1 device exists).

Also, how are you editing config.txt in NOOBS?

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 1:34 am

AndyD wrote:@Malman35 the strange thing is if I don't have an Adafruit TFT display. If I add "dtoverlay=pitft28-resistive,rotate=90" to my config.txt file I get a device create

Code: Select all

ls -l /dev/fb1
crw-rw---T 1 root video 29, 1 May 18 23:39 /dev/fb1
and I get the following message from dmesg

Code: Select all

dmesg | grep fbtft
[    5.576901] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    5.763404] fbtft_of_value: buswidth = 8
[    5.803512] fbtft_of_value: debug = 0
[    5.873827] fbtft_of_value: rotate = 90
[    5.935210] fbtft_of_value: fps = 25
One thing worth trying. Edit the file /etc/modprobe.d/raspi-blacklist.conf and comment out the line

Code: Select all

blacklist spi-bcm2708
change it to

Code: Select all

# blacklist spi-bcm2708
and then reboot (and check the dmesg output and if the /dev/fb1 device exists).

Also, how are you editing config.txt in NOOBS?
Aha! When I edited /boot/config.txt file I added this

Code: Select all

dtoverlay=pitft28-
resistive,rotate=90
instead of

Code: Select all

dtoverlay=pitft28-resistive,rotate=90
This happened cause when I saw it it was on my phone and it had squished it so I thought a enter was supposed to be there. any how the screen is plain black now (yippee we change the screen from white to black. How cool. just kidding :lol: ) this is what came up when i typed

Code: Select all

[email protected] ~ $ls -l /dev/fb1
crw-rw---T 1 root video 29, 1 Jan  1  1970 /dev/fb1
I haven't set up the time. ;)
here is what came up next

Code: Select all

[email protected] ~ $dmesg | grep fbtft
[    6.875262] fbtft: module is from the staging directory, the quality is unknown, you have been warned.
[    6.945705] fbtft_of_value: buswidth = 8
[    7.091551] fbtft_of_value: debug = 0
[    7.097430] fbtft_of_value: rotate = 90
[    7.320022] fbtft_of_value: fps = 25
But when I type

Code: Select all

FRAMEBUFFER=/dev/fb1 startx
It won't come up on the screen so when I plugged in my moniter (after it did not show up on my tft screen) it was enlarged like it should be on my little screen. Also there was no file by the name of /etc/modprobe.d/raspi-blacklist.conf

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 5:40 am

Malman35 wrote:...Also there was no file by the name of /etc/modprobe.d/raspi-blacklist.conf
OK, that is a good thing!

Is you TFT display changing at all when you boot your Raspberry Pi?

Try the following. It should produce a random pattern on your TFT display.

Code: Select all

cat /dev/urandom > /dev/fb1

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 5:54 am

AndyD wrote:
Malman35 wrote:...Also there was no file by the name of /etc/modprobe.d/raspi-blacklist.conf
OK, that is a good thing!

Is you TFT display changing at all when you boot your Raspberry Pi?
No... It is just plain black
AndyD wrote: Try the following. It should produce a random pattern on your TFT display.

Code: Select all

cat /dev/urandom > /dev/fb1
Whoa !!!!!! Static appeared on my screen! how cool is that! Seriously I am ecstatic (no pun intended :lol: ) that something came up on my screen!
Last edited by Malman35 on Tue May 19, 2015 7:37 am, edited 2 times in total.

User avatar
DougieLawson
Posts: 33616
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 7:11 am

Malman35 wrote: Whoa !!!!!! Static appeared on my screen! how cool is that! Seriously I am astatic ecstatic (no pun intended :lol: ) that something came up on my screen!
FTFY, you're welcome.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 12:28 pm

DougieLawson wrote:
Malman35 wrote: Whoa !!!!!! Static appeared on my screen! how cool is that! Seriously I am astatic ecstatic (no pun intended :lol: ) that something came up on my screen!
FTFY, you're welcome.
Your welcome. I had to look up what FTFY meant because I didn't know. (I only text my parents so I don't know all those achrenimes ;) )
Spelling is the subject I am worst at.
Hope to get the screen up and running soon.

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 1:04 pm

Malman35 wrote:Whoa !!!!!! Static appeared on my screen! how cool is that! Seriously I am ecstatic (no pun intended :lol: ) that something came up on my screen!
Well that is good news!

OK appears I missed an important step. Edit the file /usr/share/X11/xorg.conf.d/99-fbturbo.conf and change

Code: Select all

        Option          "fbdev" "/dev/fb0"
to

Code: Select all

#        Option          "fbdev" "/dev/fb0"
Now try

Code: Select all

FRAMEBUFFER=/dev/fb1 startx

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Tue May 19, 2015 10:12 pm

Wooooohooooo it works!
The screen shows a desktop!!!!!!! I would show you a picture but it says the file is to big. oh well. Thanks for your help AndyD but how do I get the touchscreen to work :?:
Oh I thought of something else. I wanted to know how to use the 4 little buttons that are below the touchscreen. Also could I use them with a terminal command.

Code: Select all

#the code for if I push one of the buttons
pkill epiphany #stops any running windows of epiphany so you won't have a whole bunch of windows open
epiphany www.raspberrypi.org 

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Thu May 21, 2015 12:34 am

A little help please! :)

User avatar
AndyD
Posts: 2326
Joined: Sat Jan 21, 2012 8:13 am
Location: Melbourne, Australia
Contact: Website

Re: A big problem with Adafruit touchscreen

Thu May 21, 2015 2:43 am

Malman35 wrote:A little help please! :)
Hi Malman35,

I don't have a touch screen set up, but I am willing to help. Unfortunately at the moment I don't have time to look into it. Hopefully someone else will step in.

Malman35
Posts: 425
Joined: Sun Nov 30, 2014 4:51 am

Re: A big problem with Adafruit touchscreen

Thu May 21, 2015 4:55 am

AndyD wrote:
Malman35 wrote:A little help please! :)
Hi Malman35,

I don't have a touch screen set up, but I am willing to help. Unfortunately at the moment I don't have time to look into it. Hopefully someone else will step in.
No problem. Thank you for being very responsive. I just hope someone else does step in that has legitimate help.

m160447ec
Posts: 3
Joined: Wed Feb 21, 2018 9:11 pm

Re: A big problem with Adafruit touchscreen

Wed Feb 21, 2018 9:27 pm

hi every one ,i am new to raspberry pi.I am trying to install adafruit 2.8 inches 320x240 touch screen on my pi(rasbian stretch os new release) but i am not able to do that.please help me out.i have been trying from last 10 days.[https://learn.adafruit.com/adafruit-pit ... stallation] .like above mentioned iam also getting same error(mv: cannot stat `/usr/share/X11/xorg.conf.d/99-fbturbo.conf': No such file or directory) when i use (sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~)
thank u in advance

Return to “Other projects”

Who is online

Users browsing this forum: No registered users and 8 guests