Modifications

Sauter à la navigation Sauter à la recherche
3 130 octets ajoutés ,  12 juillet 2015 à 17:03
Ligne 57 : Ligne 57 :     
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-15.png|640px}}
 
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-15.png|640px}}
 +
 +
The '''rotate=''' variable tells the driver to rotate the screen 0 90 180 or 270 degrees.
 +
* '''0''' is portrait, with the bottom near theUSB jacks
 +
* '''90''' is landscape, with the bottom of the screen near the headphone jack
 +
* '''180''' is portrait, with the top near the USB jacks
 +
* '''270''' is landscape, with the top of the screen near the headphone jack.
 +
You can change this file with nano and reboot to make the change stick.
 +
 +
The '''speed=''' variable tells the driver how to fast to drive the display. 42MHz ('''42000000''') is a good place to start but if your screen is acting funny, try taking it down to 16MHz ('''16000000''') especially if you're doing something like using a GPIO extender to put the screen away from the Pi.
 +
 +
Save the file. Now we'll just reboot to let it all sink in.
 +
 +
'''sudo shutdown -h now''' (if you don't have the TFT installed, shutdown, place the TFT on the Pi and re-power)
 +
 +
OU
 +
 +
'''sudo reboot''' (if you have the TFT plate installed already)
 +
 +
When the Pi restarts, the attached PiTFT should start out all white and then turn black. That means the kernel found the display and cleared the screen. If the screen did not turn black, that means that likely there's something up with your connection or kernel install. Solder anything that needs resoldering!
 +
 +
 +
Now that you're rebooted, log back in on the console/TV/SSH. There's nothing displayed on the screen yet, we'll do a test to make sure everything is perfect first!
 +
 +
 +
Run the following commands to startx on the /dev/fb1 framebuffer, a.k.a PiTFT screen:
 +
 +
<nowiki>sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
 +
export FRAMEBUFFER=/dev/fb1
 +
startx</nowiki>
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-20.png|640px}}
 +
 +
You should see the Pi desktop show up on the TFT! Congrats, you've completed the first test perfectly.
 +
 +
 +
Hit Control-C in the console to quit the X server so we can continue configuration
 +
 +
 +
Next up we'll add support for the touch screen automatically on boot. Edit the module list with
 +
 +
 +
<nowiki>sudo nano /etc/modules</nowiki>
 +
 +
and add '''stmpe-ts''' on a line at the end
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-21.png|640px}}
 +
 +
Save the file and reboot the Pi with '''sudo reboot''' and look at the console output (or run '''dmesg''' in the console window after logging in) you will see the modules install. Look in particular for the STMPE610 detection and the HX5387D screen frequency as highlighted here
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-22.png|640px}}
 +
 +
We can set up the touchscreen for '''rotate=90''' configuration by doing the following (for more delicate calibration or for other rotate=XX values, see the next section)
 +
Create the directory and new calibration configuration file:
 +
 +
<nowiki>sudo mkdir /etc/X11/xorg.conf.d
 +
sudo nano /etc/X11/xorg.conf.d/99-calibration.conf </nowiki>
 +
 +
and enter in the following lines, then save.
 +
 +
<nowiki>Section "InputClass"
 +
        Identifier      "calibration"
 +
        MatchProduct    "stmpe-ts"
 +
        Option  "Calibration"  "3800 120 200 3900"
 +
        Option  "SwapAxes"      "1"
 +
EndSection</nowiki>
 +
 +
{{ADFImage|RASP-PiTFT-PLUS-Soft-Install-23.png|640px}}
    
{{RASP-PiTFT-PLUS-TRAILER}}
 
{{RASP-PiTFT-PLUS-TRAILER}}
29 910

modifications

Menu de navigation