ian_hydes
Posts: 15
Joined: Tue Aug 06, 2013 11:43 am

Re: 2.8" TFT + Touch Shield Board v2

Tue Mar 18, 2014 4:28 pm

Followed the clock instructions and it works! :D
I slipped up a couple of times putting in the rev 1 figure instead of rev 2 (i2c-1 instead of i2c-0) but once I sorted that it all works spot on.

Got bluetooth login working as well as wireless access point mode now.
Working on a case and setting up a couple of switches on the gpio for power on/off and a spare.

Going to try the vlc beta streaming stuff I've seen on raspi.tv

Really pleased with it. Thanks for pointing me to the right places.

Ian

blacklionboy
Posts: 8
Joined: Fri Dec 27, 2013 12:24 am

Re: 2.8" TFT + Touch Shield Board v2

Fri Mar 21, 2014 10:55 pm

Hi texy/all

I followed those instruction and it boots to X11 perfectly!

However new problem! I try to run my pygame file which worked perfectly before and I get the error

"pygame.error: Unable to open a console terminal"

Has anyone else got this error? Anyone know a fix? I have been reading that it is something to with X11 being run as normal user rather than root but not sure on this?

Thanks!
texy wrote:Hi,
You want to auto boot to the X11 GUI?
Use Notro's image as now suggested in the first post, then use raspi-config to select boot to desktop.
Texy

xenu
Posts: 1
Joined: Sun Mar 23, 2014 2:15 pm

Re: 2.8" TFT + Touch Shield Board v2

Sun Mar 23, 2014 2:22 pm

Hi Texy,

I bought one of these from you on eBay last week, but i'm having serious calibration issues.

I used the 2014-01-07-wheezy-raspbian-2014-02-03-fbtft-hy28b.zip image, which works, screen seems ok, but then I ran ts_calibrate and used a stylus and when using X windows I cannot click in the bottom right near logout, I cant click in the top or bottom left. I actually have to click off the lcd part somewhere in the frame to reach these regions. I've calibrated it many times, but still cannot reach these areas. It seems to be off a bit.

Am I doing something wrong? Is my tft dodgy ? If you need any output let me know, after I calibrated it the output was

Code: Select all

xres = 320, yres = 240
Took 27 samples...
Top left : X =  966 Y =  910
Took 22 samples...
Top right : X = 1004 Y = 3392
Took 31 samples...
Bot right : X = 3053 Y = 3387
Took 19 samples...
Bot left : X = 3123 Y =  916
Took 17 samples...
Center : X = 2043 Y = 2175
-31.452515 -0.000029 0.088828
-16.485321 0.066527 0.000425
Calibration constants: -2061272 -1 5821 -1080382 4359 27 65536 
But it seems to be quite a bit off. For example in a file browser window in X, if i click file, it goes to the menu item next to it (Edit). I can show you a video if it helps, not the easiest thing to explain in writing :)

Thanks for any assistance.

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Sun Mar 23, 2014 3:08 pm

Hi,
I my experience, calibration is rarely spot on and could be off by a few pixels in either X and/or Y. For such a small screen and resolution it's not usually a problem - no one has commented on it before as far as I can remember. I guess if you experimented a bit with the calibration routine you could 'fool' it into removing the effect you are seeing by deliberately pressing down in the opposite (?) direction to where the cursor is appearing in normal use?
To remove the current calibration settings (from Notro's github page) :
How to I recalibrate the touchpanel for X windows?
Delete /etc/pointercal.xinput, and then startx
Give it go - of course if you are not 100% happy I can replace or accept it's return.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Johnny5C
Posts: 82
Joined: Thu Apr 18, 2013 3:32 pm

Re: 2.8" TFT + Touch Shield Board v2

Thu Mar 27, 2014 5:27 pm

Hi all, I just wanted to share my experience with the screen. I am really pleased with it, and I’m just about getting to where I want to be.

I’m making a small deployable time-lapse camera, all wrapped up in a Peli 1120 camera case. I will post some pics when finished.

I basically wanted to run headless and run shell scripts of various raspistill commands from executable desktop icons.

I started with Notro's pre-configured image on my SD, and started running raspistill commands in LXDE on X GUI.

Out of the box, the camera preview is not displayed on the screen in X.

I made fbcp executable (the binary is already on the notro image) with the following code.

Code: Select all

chmod +x /usr/local/bin/fbcp
I created a new file on the desktop called fbcptest.sh and put in the following lines:

Code: Select all

fbcp &
raspivid -t 5000
pkill fbcp
I then made it executable in a terminal with:

Code: Select all

sudo chmod +x /home/pi/Desktop/fbcptest.sh
Running this starts fbcp (so I can see the camera preview), runs raspivid for 5 seconds, and then stops fbcp and returns me to my desktop….

(I must note at this point my desktop does not recover properly. I have to swipe diagonally and highlight everything for it to come back - i don’t know why - probably and x and fbcp problem)

This will eventually become my camera pointing test. After setting the FOV I can run a raspistill time lapse code from the desktop in the same way.

Cool. But I don’t want to log in and manually start x with a keyboard every time. I’m trying to keep peripherals to a minimum.

Going into raspi-config and setting boot to x has never worked for me with this screen. There is probably a way to fix this, but this is my work around.

Configure your pi to auto login and start x using the guide here. It’s very simple. http://elinux.org/RPi_Debian_Auto_Login and it works like a charm.

I now boot to x desktop, double tap my shell scripts on the desktop and voila! No keyboard, no mouse, just a pi, a camera, a screen and a battery.

I must thank texy for his help. I have been filling his inbox with noob questions all week, and he has been a great help.

I appreciate none of this is particularly ground breaking, but I wanted to help anyone else by sharing my experience.

Cheers

John

shaoq
Posts: 6
Joined: Fri Jan 31, 2014 3:01 pm

Re: 2.8" TFT + Touch Shield Board v2

Fri Mar 28, 2014 12:22 pm

hi,

i installed the screen and it all works fine with rasbian.
I also installed retropie(emulationstation) on it from : http://blog.petrockblock.com/retropie/
the problem now is. that this wont show up on the screen.. so i plugged the hmdi in to see wath was going on.
when i started any games on it it wouldn't work on the screen.
But for some reason duke nukem does work on the screen. So i guess it is compatible with the screen.
any idea how i can make everything of the retropie work on the screen?

thx,
shaoq

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Fri Mar 28, 2014 1:03 pm

Fbcp?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

shaoq
Posts: 6
Joined: Fri Jan 31, 2014 3:01 pm

Re: 2.8" TFT + Touch Shield Board v2

Fri Mar 28, 2014 1:30 pm

not sure.... can't rly see it on the screen its realy small :S

Johnny5C
Posts: 82
Joined: Thu Apr 18, 2013 3:32 pm

Re: 2.8" TFT + Touch Shield Board v2

Fri Mar 28, 2014 10:00 pm

shaoq wrote:not sure.... can't rly see it on the screen its realy small :S
2.8 inches small?

pirate008
Posts: 14
Joined: Wed Jul 31, 2013 8:15 am

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 4:13 pm

Fauveboy wrote:
texy wrote:
Fauveboy wrote:Hi
Made some progress since my last comment. Ive managed to calibrate the screen through ssh the cross hatches did respond. As I carried on I manage to get the python "touch here to exit" to appear and eventually onwards to the desktop. But the screen keeps glitching? A bit like when theres a virus on a computer or its really slow and you drag a window and it does that thing where it repeats the image behind really quickly when you drag it, if im making any sense, anyway. What a appears on the tft seems to be version of that, it keeps repeating an area of its self above the previous one and Im not sure what that could be down to?...also after I type the command FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 the desktop appears and I've done the sudo nano /boot/cmdline.txt and when I go to reboot through SSH nothing appears again on the tft ?

Thank you very much for reading
Not sure about the glitching - are you able to post a picture or video?
Regarding losing the console after reboot - are you sure that the cmdline.txt is all on one line and copied correctly?

Texy
Hi
I double checked the cmdline.txt, when I boot the Pi the screen goes from white to black like when you first initialise the screen but no further. when I type FRAMEBUFFER=/dev/fb1 startx -- -dpi 60 into the pi terminal through ssh it is the only occassion I find an image of the desktop ive up loaded an image of what this looks like, please find the files attached as jpeg. Im not sure if the reason for this can be Identified but it must be down to something ay? :?
Thank you
Hi Texy, Fauveboy,

I'am experiencing exactly the same issues. I have a couple of these screens and both are having the same issue. Screen works ok except the touch panel. As soon as I touch the screen anywhere it is doing same thing as in Fauveboys pictures.

Did you manage to solve the problem?

Regards,
Sandis

EDIT: I'm using the image from the link provided in the first post for version 2 board with no modifications.

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 4:51 pm

Hi,
When did you buy the display?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

pirate008
Posts: 14
Joined: Wed Jul 31, 2013 8:15 am

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 5:02 pm

texy wrote:Hi,
When did you buy the display?
Texy
Hi Texy,

I have bought HY28A from you in the past, but these are HY28Bs that I got off my mate.
I just cant figure out what could be wrong. All wiring is as per notros wiki and both screens work ok. As soon as I start X and attempt to use touch panel exactly the same banding problem appears.

Sandis

P.S. Here is a quick video where the problem can be seen https://dl.dropboxusercontent.com/u/232 ... G_0973.MOV

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 5:57 pm

Hi,
to cut a long story short, the SPI bus is being driven at a speed that exceeds the displays limits, however 9 out of 10 displays work fine.
Looks like you have a couple that do not like running at 48mhz. Try reducing the SPI bus speed to 32mhz :

Code: Select all

sudo modprobe fbtft dma
sudo modprobe fbtft_device name=hy28b rotate=90 speed=32000000
You'll need to enter that into the /etc/module file.

Just to confirm that the displays were NOT purchased from me ;)
Hope this helps,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

pirate008
Posts: 14
Joined: Wed Jul 31, 2013 8:15 am

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 6:05 pm

Hi Texy,

Thank you for your input. I will try and change the speed in modules file although i did try and change the speed in the cmdline.txt file to 16000000 and this did not make any difference.

No I did not purchase these two screens from you so no returns are coming your way :lol:

I'll let you know how it goes. Did you manage to sort Fauveboys screen out? Looks the same as what i'm getting.

Regards,
Sandis

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Tue Apr 01, 2014 6:30 pm

Hi,
yes I sorted his out by replacing it.
Thanks,
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

natko
Posts: 1
Joined: Wed Apr 02, 2014 6:35 pm

Re: 2.8" TFT + Touch Shield Board v2

Wed Apr 02, 2014 6:44 pm

Many thanks Texy received the screen, worked out of the box with the image provided.

Unluckily gave it to my nephew when he had fun with it, never get drunk with nephews 8-)

If you have dimensions you could post I would like to modify my pie case design to include your screen, also if you decide to sell some more I'm open to get one, no nephews expected in a year or two.

oh, pie case design is here:
http://www.thingiverse.com/thing:284923

Hope you like it n thanks

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Wed Apr 02, 2014 8:05 pm

I'll get those dimensions for you. In the mean time, next batch is available :
http://m.ebay.co.uk/itm/321369188318
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

neroabarth
Posts: 8
Joined: Thu Mar 20, 2014 2:05 pm

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 07, 2014 5:56 pm

Hi Texy,

Board working great! Might you have any suggestions on how I could adjust the size of the desktop on the 2.8? If i open anything on the desktop I only get a section of it, and cant see the whole thing (to hit buttons, etc)?

Tried searching around but havent had any luck so far -

Thanks,
Adam

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 07, 2014 6:10 pm

Well it depends on how well the application handles the resolution of the display - some are better than others. I would suggest opening the apps windowed rather than full screen, then altering the settings for each app so that you can get to the important buttons. Sorry I can't help much as I don't use X very often.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

cherrybombuc
Posts: 24
Joined: Mon Feb 25, 2013 4:59 pm

Re: 2.8" TFT + Touch Shield Board v2

Thu Apr 10, 2014 12:26 pm

When I write "sudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/event0 ts_calibrate", I cant calibrate, terminal show me "no such file or directory"

Please help me!!!

is this pin distribucion?

WIRING with RaspberryPi
LCD Display GPIO name RPi Pin
3V3_in————–3.3V—————-1
GND—————-GND—————-6
LCD_SCK———-SCLK—————23
LCD_SDO———MISO—————21
LCD_SDI———–MOSI—————19
LCD_CS————CE0—————–24
LCD_RST———-GPIO25————22
TP_SCK————SCLK—————-23
TP_SDO———–MISO—————-21
TP_SDI————-MOSI—————19
TP_CS————–CE1——————26
TP_IRQ————GPIO17————-11
BL_CTRL———-GPIO18————-12

Thaks

shifters67
Posts: 2
Joined: Sat Apr 26, 2014 10:32 am

Re: 2.8" TFT + Touch Shield Board v2

Sat Apr 26, 2014 10:36 am

Hi Texy,

i have the touch screen and it is working very nicely with your downloadable image.

I have patched everything up to the latest - following your instructions that is and all is fine.

I have tried installing and running kivy (the python GUI). Following the kivy instructions for installing and building kivy and all its dependencies seem to go fine but when i try and run anything i get the following error. I have logged this as an issue with the kivy project but wondered if you had tried running kivy on your device - it seems ready made for kivy gui's with touch etc!!!

Edited update - this test is not working but a different one did - but the display was to the HDMI - nothing on the touch TFT. Is there a way to get the kivy output onto the 2.8 screen?

FO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_14-04-26_2.txt
[INFO ] Kivy v1.8.1-dev
[INFO ] [Python ] v2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3]
[INFO ] [Factory ] 157 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_pygame, img_gif (img_pil ignored)
[ERROR ]
Traceback (most recent call last):
File "/home/pi/kivy/kivy/lang.py", line 1186, in execute_directives
mod = import('.'.join(package.split('.')[:-1]))
File "/home/pi/kivy/kivy/extras/highlight.py", line 3, in
from pygments.lexer import RegexLexer, bygroups, using
ImportError: No module named pygments.lexer
Traceback (most recent call last):
File "main.py", line 212, in
ShowcaseApp().run()
File "/home/pi/kivy/kivy/app.py", line 773, in run
self.load_kv(filename=self.kv_file)
File "/home/pi/kivy/kivy/app.py", line 593, in load_kv
root = Builder.load_file(rfilename)
File "/home/pi/kivy/kivy/lang.py", line 1546, in load_file
return self.load_string(data, **kwargs)
File "/home/pi/kivy/kivy/lang.py", line 1593, in load_string
parser = Parser(content=string, filename=fn)
File "/home/pi/kivy/kivy/lang.py", line 1122, in init
self.parse(content)
File "/home/pi/kivy/kivy/lang.py", line 1220, in parse
self.execute_directives()
File "/home/pi/kivy/kivy/lang.py", line 1197, in execute_directives
package)
kivy.lang.ParserException: Parser: File "./showcase.kv", line 2:
...
1:#:kivy 1.8.0

2:#:import KivyLexer kivy.extras.highlight.KivyLexer
3:#:import Factory kivy.factory.Factory
4:
...
Unable to import package 'kivy.extras.highlight.KivyLexer'

regards

Shifters

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 28, 2014 5:03 pm

Hi Shifters,
sorry I do not have any experience of Kivy. Are you sure that the problems you have a related to the TFT screen? If you try the same procedure with the standard raspbian image, but for normal output, does it work without error?
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 28, 2014 5:37 pm

Build instructions for those who have purchase the 2.8" TFT Shield as a kit.
This is what you need :
The Kit -
Image

A soldering iron with fine tip
Solder
Side-cutters
Mini-clamp
Raspberry Pi
ESD friendly work surface

Fit the right-angled connector to the pcb and solder, ensuring there are no shorts :
Image
Fit the straight long pinned connector onto the pi, then the pcb onto the connector, making sure the pcb is flat, parallel with the Pi's pcb, and use the clamp to hold in place :
Image
Snip both connectors pins as close to the pcb as possible :
Image
Fit the TFT display board to the pcb, making sure the arrows point in the same direction, then solder the display, again ensuring there are no solder shorts and snip the pins so they are flush :
Image
At this stage I usually test the display and touch panel as per instructions on the first post. Make sure you do not short out the pins on the top of the USB connector by using the foam pads supplied (but do not stick them down yet). Once you are happy with the display shiel you can peel off 1 side of the foam pads and place them over the pins :
Image

Construction complete!
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

shifters67
Posts: 2
Joined: Sat Apr 26, 2014 10:32 am

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 28, 2014 5:52 pm

HI Texy,

I did get one example working but the output was to HDMI only not the touch screen. Is there a way to do this? fbcp?

Shifters
texy wrote:Hi Shifters,
sorry I do not have any experience of Kivy. Are you sure that the problems you have a related to the TFT screen? If you try the same procedure with the standard raspbian image, but for normal output, does it work without error?
Texy

texy
Forum Moderator
Forum Moderator
Posts: 5144
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board v2

Mon Apr 28, 2014 6:02 pm

fbcp is the method I recommend in most cases. It's quick, light and not cpu intensive.
Texy
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “HATs and other add-ons”