0

Pi 2 PiTFT Compatibility
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.

Pi 2 PiTFT Compatibility

by adafruit_support_rick on Fri Feb 20, 2015 10:59 am

Those of you with PiTFTs, you might want to check out this thread:
http://forums.adafruit.com/viewtopic.ph ... 48#p346252

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Pi 2 Compatibility Updates

by jbntx on Fri Feb 20, 2015 11:26 am

It does work, Rick , but as the post says, the touchscreen does not work, so it's only half a solution. I've got it running on my RPi 2, and it works quite well with a keyboard and mousepad.

jbntx
 
Posts: 9
Joined: Sun Apr 14, 2013 3:02 pm
Location: McKinney, Texas, USA

Re: Pi 2 Compatibility Updates

by tictag on Fri Feb 20, 2015 5:41 pm

Just spent the better part of four hours scratching my head but finally got my Adafruit PiTFT 2.2" HAT Mini Kit - 320x240 2.2" TFT - No Touch working on my RP2 :-)

I'm not a developer and words like 'kernel' scare me to death but it is possible for laypeople out there and everything you need is on notros fbtft page (https://github.com/notro/fbtft/wiki).

Installation is pretty easy but configuration of the actual screen is a bit of a pain, in short the steps are:

STEP 1: Install fbtft
Code: Select all | TOGGLE FULL SIZE
sudo REPO_URI=https://github.com/notro/rpi-firmware rpi-update

STEP2: Modify config.txt by adding dtparam=spi=on and dtoverlay=pitft to /boot/config.txt
Code: Select all | TOGGLE FULL SIZE
sudo nano /boot/config.txt

STEP3: Enable the screen during boot by adding fbcon=map:10 fbcon=font:VGA8x8 to the end of /boot/cmdline.txt then for a more compact font in the terminal, choose UTF8 > Guess optimal character set > Terminus > 6 x 12 (framebuffer only) using dpkg-reconfigure
Code: Select all | TOGGLE FULL SIZE
sudo nano /boot/cmdline.txt
sudo dpkg-reconfigure console-setup

STEP4: Reboot to see your screen working on the RP2! :-)
Code: Select all | TOGGLE FULL SIZE
sudo reboot

That's it!.......but I found that the screen was upside down (for my needs) and the overlay (read that as 'configuration') included stuff about touch screens and GPIO pins that I didn't want. In order to change the overlay (configuration) you have to download and edit an example dts file (device tree script), compile it into a dtb (device tree blob) then store it in the /boot/overlays folder, to be called during the kernel boot. YOU ONLY NEED TO DO THIS IF YOU WANT TO CHANGE THE CONFIGURATION:


STEP5: Download an example dts file, for pitft:
Code: Select all | TOGGLE FULL SIZE
sudo wget https://raw.githubusercontent.com/notro/fbtft/master/dts/overlays/rpi/pitft-overlay.dts /boot/overlays/pitft-overlay.dts

STEP6: Edit it as required, for example, I changed the pitft: pitft@0 rotate parameter to 270 and completely removed the pitft_ts section. More info here: https://github.com/notro/fbtft/wiki/FBTFT-RPI-overlays
Code: Select all | TOGGLE FULL SIZE
sudo nano /boot/overlays/pitft-overlay.dts

STEP7: Compile the revised dts script into a revised dtb file
Code: Select all | TOGGLE FULL SIZE
wget -c https://raw.githubusercontent.com/RobertCNelson/tools/master/pkgs/dtc.sh
chmod +x dtc.sh
./dtc.sh
sudo dtc -@ -I dts -O dtb -o /boot/overlays/pitft-overlay.dtb pitft-overlay.dts

STEP8: Reboot
Code: Select all | TOGGLE FULL SIZE
sudo reboot

Your revised overlay (configuration) should now be active. Sweet.

p.s. Personally I don't like booting straight in X Windows so I used the raspi-config tool to boot to the terminal only. If I want to run it, I just type xstart at the terminal.
--

tictag
 
Posts: 218
Joined: Sun Feb 15, 2015 4:01 pm

Re: Pi 2 Compatibility Updates

by raskolnikoov on Fri Feb 20, 2015 8:27 pm

Hi, I have the Adafruit 2.8" TFT display with touch. Will this work for this model also (not the touch part)?

raskolnikoov
 
Posts: 6
Joined: Tue Feb 17, 2015 5:59 pm

Pi 2 PiTFT Compatibility

by jbntx on Fri Feb 20, 2015 8:49 pm

Yes, it will.

jbntx
 
Posts: 9
Joined: Sun Apr 14, 2013 3:02 pm
Location: McKinney, Texas, USA

Re: Pi 2 PiTFT Compatibility

by raskolnikoov on Sat Feb 21, 2015 10:47 am

I got it working today. But im having issues viewing RetroPie emulationstation on the pitft. When I start a game it goes black. Any idea?

raskolnikoov
 
Posts: 6
Joined: Tue Feb 17, 2015 5:59 pm

Re: Pi 2 PiTFT Compatibility

by olipayne on Sat Feb 21, 2015 12:43 pm

raskolnikoov wrote:I got it working today. But im having issues viewing RetroPie emulationstation on the pitft. When I start a game it goes black. Any idea?


Did you up the gpu_mem?

olipayne
 
Posts: 2
Joined: Tue Feb 17, 2015 4:06 pm

Re: Pi 2 PiTFT Compatibility

by raskolnikoov on Sat Feb 21, 2015 12:57 pm

Yes it's set to 256mb. I got picture on the hdmi cabel put not on pitft.

raskolnikoov
 
Posts: 6
Joined: Tue Feb 17, 2015 5:59 pm

Re: Pi 2 PiTFT Compatibility

by tapanther on Sat Feb 21, 2015 2:11 pm

raskolnikoov wrote:I got it working today. But im having issues viewing RetroPie emulationstation on the pitft. When I start a game it goes black. Any idea?


Hey raskolnikoov,

If I'm not mistaken, emulationstation doesn't work directly on the PiTFT. If you look at this reddit thread ( http://www.reddit.com/r/raspberry_pi/co ... _retropie/ ) you need fbcp to "copy" the image output from emulationstation to the PiTFT framebuffer, but it's a little slow.

tapanther
 
Posts: 2
Joined: Sat Feb 21, 2015 12:53 am

Re: Pi 2 PiTFT Compatibility

by antony123 on Sun Feb 22, 2015 8:01 am

my display pitft 1601 initially is white, after putting the driver turns black but do not see anything ... why?

antony123
 
Posts: 6
Joined: Tue Feb 17, 2015 9:48 am

Re: Pi 2 PiTFT Compatibility

by martywittrock on Tue Feb 24, 2015 7:12 pm

tictag,

Just a quick question - I followed all your steps and I have the display working excellent in console mode - all the characters are visible on the display and looks great..! But when I do 'startx' the PI boots directly to my HDMI screen and not to the 2.8" pitft display. I made all the adjustments to the cmdline and config files, but still not getting the Raspi to display there. I've tried the FRAMEBUFFER=/dev/fb0 startx and FRAMEBUFFER=/dev/fb1 startx commands on the console display (on the 2.8" tft at that time) and see all that happening, but it only boots to HDMI.

Any hints as to why this is happening? Please advise at your soonest - thanks..!

Marty

martywittrock
 
Posts: 7
Joined: Mon Feb 16, 2015 11:38 pm

Re: Pi 2 PiTFT Compatibility

by AuronJS on Tue Feb 24, 2015 9:05 pm

Marty,

Did you modify /usr/share/X11/xorg.conf.d/99-fbturbo.conf by changing
Option "fbdev" "/dev/fb0"
to
Option "fbdev" "/dev/fb1"

?

AuronJS
 
Posts: 12
Joined: Sat Feb 21, 2015 3:04 pm

Re: Pi 2 PiTFT Compatibility

by martywittrock on Tue Feb 24, 2015 11:16 pm

Auron,

IT WORKED..!! Many thanks for the tip on getting my 2.8" pitft to work with my Pi V2 Model B - - it looks GREAT..! :)

Thanks again -

Marty

martywittrock
 
Posts: 7
Joined: Mon Feb 16, 2015 11:38 pm

Re: Pi 2 PiTFT Compatibility

by AuronJS on Tue Feb 24, 2015 11:33 pm

Awesome!!!

AuronJS
 
Posts: 12
Joined: Sat Feb 21, 2015 3:04 pm

Re: Pi 2 PiTFT Compatibility

by martywittrock on Fri Feb 27, 2015 1:07 am

Auron,

Now that I have the small screen working for display (no touch), I'm not able to switch between the HDMI and the small screen like I did before by doing the following right after log-in:

FRAMEBUFFER=/dev/fb0 startx (for the small screen)
FRAMEBUFFER=/dev/fb1 startx (for the HDMI screen)

It just keeps booting into the small screen.

Is there a fix for this...? Please let me know - thanks!

Marty

martywittrock
 
Posts: 7
Joined: Mon Feb 16, 2015 11:38 pm

Please be positive and constructive with your questions and comments.