TheWhiteDragon
Posts: 2
Joined: Mon Jul 08, 2013 6:24 am

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 6:26 am

brilliant work texy, ill be placing an order tonight :)

vgulch
Posts: 1
Joined: Wed Nov 16, 2011 10:32 pm

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 8:49 am

cool. Post so I can PM!!

Aikidokajeff
Posts: 68
Joined: Fri May 25, 2012 3:31 pm

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 2:16 pm

Great video, I can't wait to have a play with one :-)

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

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 2:48 pm

Aikidokajeff wrote:Great video, I can't wait to have a play with one :-)
All that have paid have been posted, so it wont be long. Remember to check back and show us what you've done with it ;)

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

Aikidokajeff
Posts: 68
Joined: Fri May 25, 2012 3:31 pm

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 3:05 pm

Excellent to hear!
I don't know how much time I'll have during the week to play with it but I hope to get it working as the screen to my mobile Pi Camera :-)
Maybe even a monitor to keep updated on my webserver stats.
Or even a screen for the kids' xbmc media player.

So many things, so little time.

It'll be great to see what everyone else does too.

deangreen4
Posts: 2
Joined: Wed Jul 03, 2013 8:48 pm

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 6:03 pm

Hi,
screen received today and is now all set up. Works very nicely indeed. Thanks very much :)
Just waiting for the rest of my plan to put it into service

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

Re: 2.8" TFT + Touch Shield Board

Mon Jul 08, 2013 6:48 pm

Great!
No problem with my instructions then, or did you follow notro's?
T.
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

kp73
Posts: 1
Joined: Tue Jul 09, 2013 9:35 am

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 9:45 am

Very nice, I'd like an assembled one too.

inkypanda
Posts: 1
Joined: Tue Jul 09, 2013 5:09 pm

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 5:12 pm

Hi Texy! I would really love to get hold of one of these (building a handheld games console and powering a touch screen off of the GPIO pins would be ace!)

Aikidokajeff
Posts: 68
Joined: Fri May 25, 2012 3:31 pm

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 6:45 pm

deangreen4 wrote:Hi,
screen received today and is now all set up. Works very nicely indeed. Thanks very much :)
Just waiting for the rest of my plan to put it into service
Bah, lucky you.
With you saying you already had yours I had my hopes up for it waiting for me when I got home... No such luck.
:-)

tidsoptimist
Posts: 1
Joined: Tue Jul 09, 2013 6:15 pm

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 8:07 pm

Look really nice.
Will order one thru PM in a couple of days.

Anyone got any advice on a good case to go with the setup?
Thinking about getting one of the standard and then don't use the top/modify it to fit.

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

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 8:16 pm

Hi,
I have a custom case being designed right now. It may be ready in time for the next shipments, or slightly later ;)

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

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

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 8:32 pm

Although not heavily tested, an increase in speed to 22fps has found to be achievable. To test, use the following:

Firstly unload the existing module :

Code: Select all

sudo rmmod fbtft_device
The reload with the new configuration :

Code: Select all

sudo modprobe fbtft_device name=hy28afb rotate=1 speed=48000000
sudo modprobe hy28afb debug=32
The debug=32 part will add extra information to system message log. After running your application type

Code: Select all

dmesg
it will return information regarding the performance of the driver :

Code: Select all

[  243.530392] hy28afb spi0.0: Elapsed time for display update:   43.447004 ms (fps: 23, lines=240)
[  243.620599] hy28afb spi0.0: Elapsed time for display update:   43.622004 ms (fps: 22, lines=240)
[  243.712621] hy28afb spi0.0: Elapsed time for display update:   45.587004 ms (fps: 21, lines=240)
[  243.800336] hy28afb spi0.0: Elapsed time for display update:   43.380004 ms (fps: 23, lines=240)
[  243.890653] hy28afb spi0.0: Elapsed time for display update:   43.721004 ms (fps: 22, lines=240)
Can you try this and report back for the benefit of other users please.
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

haku
Posts: 2
Joined: Wed Jul 03, 2013 9:03 pm
Location: London, UK
Contact: Website

Re: 2.8" TFT + Touch Shield Board

Tue Jul 09, 2013 9:56 pm

So this not that useful but... you can just about play video.
Its not great as there is no HW acceleration and video tends to lag drastically behind the audio, but its kinda fun. :D
So in tty mode (X not running):

Code: Select all

$ setterm -cursor off
$ mplayer -vo fbdev:/dev/fb1 -vf scale=-2:240 -sws 4 video.avi
There may be some other mplayer switches that make it play smoother, but not found them yet.
(p.s. 'setterm -cursor on' to get the cursor back again afterwards)

DaveTheWalker
Posts: 36
Joined: Wed Jul 04, 2012 9:06 pm

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 9:06 am

Hi,

I'd be interested in a kit, if you have one available. UK here.

Thanks,
Dave

Aikidokajeff
Posts: 68
Joined: Fri May 25, 2012 3:31 pm

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 6:06 pm

Hooray, mine arrived today.

No time to play with it tonight, but my 3 year old said that she will help me get it working tomorrow after work.
Should be interesting.

Thanks, I hope to have updates soon.

PiGraham
Posts: 4874
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 6:58 pm

Got mine in the post today. Thanks texy!
Playing with it now. I have mplayer running quite smoothly (unscaled) and touch and pygame graphics & input.
Nice!

Code: Select all

 mplayer -vo fbdev:/dev/fb1 -volume 100 BigBuckBunny_320x180.mp4 -framedrop -geometry 0:30
Plays well

Code: Select all

AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat 61
Unsupported PixelFormat 53
Unsupported PixelFormat 81
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0xb647f640]No accelerated colorspace conversion found from yuv420p to rgb565le.
[swscaler @ 0xb647f640]using unscaled yuv420p -> rgb565le special converter
VO: [fbdev] 320x180 => 320x180 BGR 16-bit
framebuffer too small for double-buffering, disabling
A:  26.1 V:  26.0 A-V:  0.011 ct:  0.084   0/  0 40% 11% 11.0% 1 0

Code: Select all

BENCHMARKs: VC:   3.309s VO:   1.274s A:   0.928s Sys:   3.251s =    8.762s
BENCHMARK%: VC: 37.7668% VO: 14.5402% A: 10.5913% Sys: 37.1017% = 100.0000%
BENCHMARKn: disp: 208 (23.74 fps)  drop: 2 (0%)  total: 210 (23.97 fps)
Scaling to 240 high is too much.

Anyone know how I can clear the background or add black border to hide the console text top & bottom of the under-size video?
Last edited by PiGraham on Wed Jul 10, 2013 7:26 pm, edited 2 times in total.

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

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 7:01 pm

Good stuff - thanks for sharing those tips ;)
One way of clearing the borders may be to create a python script that clears the background and then call mplayer via a call like :

Code: Select all

call([mplayer -vo fbdev:/dev/fb1 -volume 100 BigBuckBunny_320x180.mp4 -framedrop -geometry 0:30])
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

PiGraham
Posts: 4874
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 8:29 pm

OK, that works, but how do I interact with the terminal session on fb1 from ssh?
setterm -term ??? -cursor off

Should that work? "tty" tells me the session on fb1 is "tty1" but setterm complains of unknown terminal type.

How can I get rid of the mouse cursor and prevent the display sleeping, or wake it up remotely?

Code: Select all

#!/usr/bin/python
# touchv5
# Texy 1/6/13
# Hacked by PiGraham 10/07/2013

from subprocess import call
import pygame, sys, os, time
from pygame.locals import *

os.environ["SDL_FBDEV"] = "/dev/fb1"

pygame.init()

# set up the window
screen = pygame.display.set_mode((320, 240), 0, 32)
pygame.display.set_caption('Drawing')

# set up the colors
BLACK = (  0,   0,   0)

# Fill background
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill(BLACK)
screen.blit(background, (0, 0))
pygame.display.flip()
pygame.display.update()

call("mplayer -vo fbdev:/dev/fb1 -volume 100 /home/pi/BigBuckBunny_320x180.mp4 $

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

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 8:47 pm

PiGraham wrote:OK, that works, but how do I interact with the terminal session on fb1 from ssh?
setterm -term ??? -cursor off
Sorry, not sure I understand the question. I use puTTY to log into the pi for the most part for CLI and running python programs. I,ve never touched setterm, or even know what it does :oops:

Should that work? "tty" tells me the session on fb1 is "tty1" but setterm complains of unknown terminal type.
PiGraham wrote: How can I get rid of the mouse cursor and prevent the display sleeping, or wake it up remotely?
I can answer part of that, for pygame anyway :

Code: Select all

pygame.mouse.set_visible(0)
However, I have also noticed the sleeping black display. Will have to do some research on how to disable it.

Code: Select all

#!/usr/bin/python
# touchv5
# Texy 1/6/13
# Hacked by PiGraham 10/07/2013

from subprocess import call
import pygame, sys, os, time
from pygame.locals import *

os.environ["SDL_FBDEV"] = "/dev/fb1"

pygame.init()

# set up the window
screen = pygame.display.set_mode((320, 240), 0, 32)
pygame.display.set_caption('Drawing')

# set up the colors
BLACK = (  0,   0,   0)

# Fill background
background = pygame.Surface(screen.get_size())
background = background.convert()
background.fill(BLACK)
screen.blit(background, (0, 0))
pygame.display.flip()
pygame.display.update()

call("mplayer -vo fbdev:/dev/fb1 -volume 100 /home/pi/BigBuckBunny_320x180.mp4 $
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: 5171
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 8:56 pm

Found this :
http://www.raspberrypi.org/phpBB3/viewt ... 54#p296180

Changing BLANK_TIME to 1 results in the screen going blank in 1 minute (just proved it), so setting this to 0 should disable it altogether.
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

PiGraham
Posts: 4874
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: 2.8" TFT + Touch Shield Board

Wed Jul 10, 2013 8:59 pm

Thanks Texy, the mouse pointer is gone.
So is the blinking text cursor, now that the whole screen is painted. When the video was over the console text the blinking cursor was visible and distracting, but it's now covered.

This will hide the cursor on the current terminal

Code: Select all

setterm -cursor off
The command can reference other terminals:

Code: Select all

setterm -term name
But it doesn't recognise the apparent name of the terminal displayed on fb1.

setterm can also alter power saving / blanking modes, but I don;t know if that is per terminal or global.

Now trying the /etc/kbd/config method.

Gubinz
Posts: 1
Joined: Thu Jul 11, 2013 12:21 pm

Re: 2.8" TFT + Touch Shield Board

Thu Jul 11, 2013 12:29 pm

This looks great.

Aikidokajeff
Posts: 68
Joined: Fri May 25, 2012 3:31 pm

Re: 2.8" TFT + Touch Shield Board

Thu Jul 11, 2013 1:12 pm

hahahaha.
I got the screen working and it is great.
Then plugged the camera in and tried taking a picture... *power down sound* All activity lights went off on Pi and the camera and the Pi is not responding. Doh.

I'll have to do some digging when I get time but it doesn't look promising so far.

Jeff

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

Re: 2.8" TFT + Touch Shield Board

Thu Jul 11, 2013 1:21 pm

That combo works for me Jeff - the camera is power hungry and the display takes ~64mA. I would try another PSU.
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 “For sale”