In a project I am working on, I am using a Vilros TFT touch screen that hooks up to the GPIO on the Pi. If the Pi is hooked up to the screen and an HDMI monitor, the monitor shows some of the booting process, freezes, and then all other output goes to the TFT. As far as I know, beyond that point, the SD card runs regular Rasbian. Is there a way to have a dual monitor in this scenario? Your help is greatly appreciated!
*edit*
WHen Minecraft is opened, the window opens on the TFT, but also on the main screen, in front of the frozen boot window. To expand or close the window, you have to use the TFT, but the actual action is being displayed on the monitor. Minecraft is a "commanding" window, meaning it is always in the foreground, and that the cursor is always within its boundaries. So, in a way, there is some dual monitor action going on. Is there a way to use this information to force the actual desktop screen to HDMI? Note: with or without the TFT, the monitor screen freezes halfway through the boot process. I have found the overlay files, but haven't located the exact one controlling this, nor been able to edit any of the overlays. Is this force of output even possible?
Thanks again!
*2nd edit*
I have located what I think is the correct overlay that controls these functions. If anyone could interpret this code, and possibly tell me what changes to make to use HDMI as well, your services would be greatly appreciated. Here is the code:
/*
* tinylcd 3.5" display
*
* display tinylcd35 spi0
* touch ads7846 spi0
* rtc ds1307 i2c1 0x68
* rtc pcf8563 i2c1 0x51
*
* ----------------------------------
* Add to /boot/config.txt:
* dtparam=spi=on
* dtparam=i2c=on
* dtparam=i2c1=on
* dtparam=i2c_arm=on
*
* dtoverlay=tinylcd35
*
*
*/
/*
* sudo dtc -@ -I dtb -O dts -o source-overlay.dts blob-overlay.dtb
* sudo dtc -@ -I dts -O dtb -o blob-overlay.dtb source-overlay.dts
*
*/
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";
fragment@0 {
target = <&spi0>;
__overlay__ {
status = "okay";
spidev@0{
status = "disabled";
};
spidev@1{
status = "disabled";
};
};
};
fragment@1 {
target = <&gpio>;
__overlay__ {
tinylcd35_pins: tinylcd35_pins {
brcm,pins = <3 25 24 18>;
brcm,function = <0 1 1 1>; /* in out out out */
};
};
};
fragment@2 {
target = <&spi0>;
__overlay__ {
/* needed to avoid dtc warning */
#address-cells = <1>;
#size-cells = <0>;
tinylcd35: tinylcd35@0{
compatible = "neosec,tinylcd";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&tinylcd35_pins>;
spi-max-frequency = <48000000>;
rotate = <270>;
fps = <50>;
bgr;
buswidth = <8>;
reset-gpios = <&gpio 25 0>;
dc-gpios = <&gpio 24 0>;
led-gpios = <&gpio 18 1>;
debug = <0>;
init = <0x10000B0 0x80
0x10000C0 0x0A 0x0A
0x10000C1 0x01 0x01
0x10000C2 0x33
0x10000C5 0x00 0x42 0x80
0x10000B1 0xD0 0x11
0x10000B4 0x02
0x10000B6 0x00 0x22 0x3B
0x10000B7 0x07
0x1000036 0x58
0x10000F0 0x36 0xA5 0xD3
0x10000E5 0x80
0x10000E5 0x01
0x10000B3 0x00
0x10000E5 0x00
0x10000F0 0x36 0xA5 0x53
0x10000E0 0x00 0x35 0x33 0x00 0x00 0x00 0x00 0x35 0x33 0x00 0x00 0x00
0x100003A 0x55
0x1000011
0x2000001
0x1000029>;
};
tinylcd35-ts@1 {
compatible = "ti,ads7846";
reg = <1>;
spi-max-frequency = <2000000>;
interrupts = <3 2>; /* high-to-low edge triggered */
interrupt-parent = <&gpio>;
pendown-gpio = <&gpio 3 0>;
ti,x-plate-ohms = /bits/ 16 <100>;
ti,pressure-max = /bits/ 16 <255>;
status = "okay"; /* "okay" "disabled" */
};
};
};
__overrides__ {
speed = <&tinylcd35>,"spi-max-frequency:0";
rotate = <&tinylcd35>,"rotate:0";
fps = <&tinylcd35>,"fps:0";
debug = <&tinylcd35>,"debug:0";
};
/* RTC */
fragment@3 {
target = <&i2c1>;
__overlay__ {
#address-cells = <0x1>;
#size-cells = <0x0>;
ds1307@68 {
compatible = "maxim,ds1307";
reg = <0x68>;
status = "disabled"; /* "okay" "disabled" */
};
pcf8563@51 {
compatible = "nxp,pcf8563";
reg = <0x51>;
status = "disabled"; /* "okay" "disabled" */
};
};
};
};