Questions with regards to ESP8266 Basic and hardware interfacing and control via Basic commands

Moderator: Mmiscool

User avatar
By tcpipchip
#53646 Yes, i am not using more the MISO TFT.

Touch is reading!

I need only your patch to touch orientation! (firmware)

Thanks!!!!!!!


lpservices wrote:Hello,

you can disconnect the MISO output from the TFT controller without any problems
espbasic does not require this line to be connected, this line is only used to read from the display,
and espbasic never read from the display, just writes to it.
Try to disconnect this line, and you will see the display functions normally

Below is the code I changed to match the touch orientation tot that of the display
I will try to compile a version with these altered function this evening

this is the codeblock in ReadTouchXY I replaced for the reversed X axis on my display:

my altered code:

switch (tft->getRotation())
{
case 0:
xf = 240 -x;
yf = y;
break;
case 1:
xf = y;
yf = x;
break;
case 2:
xf = x;
yf = 320-y;
break;
case 3:
xf = 320 -y;
yf = 240 - x;
break;
}

The original code :

switch (tft->getRotation())
{
case 0:
xf = 240 - x;
yf = 320 - y;
break;
case 1:
xf = 320 - y;
yf = x;
break;
case 2:
xf = x;
yf = y;
break;
case 3:
xf = y;
yf = 240 - x;
break;
}
User avatar
By lpservices
#53682 Hello,

here is a patched version of espbasic, I made a couple of weeks ago,
so it is not the latest greatest version,
but you can test it, it is build voor een 4M esp
if touch works fine with this version, I will path the newest version, just let me know

you can download the file from : https://1drv.ms/u/s!Aus86D6RbETcgyrhrTx6-U4Hupwy

Hope this help
lpservices
User avatar
By tcpipchip
#53692 Hello!!!! :)

I will test tomorrow and shure, i am give the feedback!!!!!! Thanks so much!

Btw, can you do a test with tft.bmp() function ?

Create two bmp imagens (320x240)

for x = 1 to 1000
bmp.plot("/uploads/xxx.bmp")
delay 1000
bmp.plot("/uploads/xxx1.bmp")
delay 1000
next x

In my LCD plot the two bmp images for a while and got STACK error...

Let me know if you get the same problem!

Thanks again!

Miguel

lpservices wrote:Hello,

here is a patched version of espbasic, I made a couple of weeks ago,
so it is not the latest greatest version,
but you can test it, it is build voor een 4M esp
if touch works fine with this version, I will path the newest version, just let me know

you can download the file from : https://1drv.ms/u/s!Aus86D6RbETcgyrhrTx6-U4Hupwy

Hope this help
lpservices
User avatar
By tcpipchip
#53718 Hello

The touch orientation BUG solved in my LCD! thanks!


Please, if possible, see that question about .bmp

for x = 1 to 1000
bmp.plot("/uploads/xxx.bmp")
delay 1000
bmp.plot("/uploads/xxx1.bmp")
delay 1000
next x