Sorry maybe sort of a random question, but I have two GIGA boards and both of them I currently have a GIGA shield on them.
Currently I am mostly using them to experiment with Zephyr and I have noticed differences on how these two boards behave. I bought both boards Several months (year?) apart.
For example on Zephyr: One of the boards, when I upload anything to them, like flashing new logical firmware or download a sketch, I always have to go to the kernel monitor, and type in: sketch
to make it run. The other board, I typically do not have to do this. Only if there was a problem loading it, like missing symbol, do I have to maybe type in sketch to find out what the problem. This has been going on for several months.
The touch coordinates are different between these two setups.
On the first board I mentioned, if you are looking at the screen in landscape mode with the camera on top, if I touch near the corners I see coordinates like:
UL: 456, 26 LL:4, 23 UR: 434, 782, LR: 23, 774.
With the other setup:
UL: 17, 14 LL:23, 434 UR: 782, 19 LR 788, 464
It is like the sensor is rotated or the the like.
Note; This was done with the example sketch: Touch_polling running on the MBED version of Arduino GIGA... I have seen the same results using my updated version of the Arduino_GigaDisplayTouch library running on Zephyr.
Wondering if these differences are due to changes to the boards? If so are there programmatic ways to detect which version we have?
I am still having the same same issue between the two Different Display shields.
It has been awhile since I did much touch, and since I had both boards running at the
same time in the same sketch...
It feels like someone attached the touch sensor rotated 90 degrees.
Is there a way to detect this in hardware and or setting to compensate within driver?
Or do sketches need to tranlate the coordinates them self?
Like on this one, sort of rough positions 480 is probably 479...
There are obviously differences:
Like Just looking at the first several registers:
8047 Config version - both 41 8048-49 X Output MAX: 800 versus 480 804A-4B Y Output Max: 480 versus 800
804C - Both support up to 5 touch points
804D - Module Switch 1: 0x4D versus 0x05
Bit6:Sensor_Resersal(X2X), configured as 1 indicates X axis reversal.
...
Question is Why? And is this a one off issue, or ...
And Best way to resolve? For my own sketch I can probably add
code to read one or more of these registers as I did here, detect that things
are reversed...
But I wonder if Arduino is aware of these differences and potentially have a patch
program to update one or the other?
The sketch now allows me to type in a new rotation 0-3, at which time
it will set the screen rotation and draw the color pallet and then map the touch.
This appears to be working on both of my two displays.
@ptillisch@pennam@facchinm and all - It would be great to know if for example my newer display was a one off oops or if Arduino changed the configuration of the registers at some point.
Note: Our (@Merlin513 and mine) Displays we purchased early on, have what I say is
the main/ not alternate configuration.
What is interesting about this configuration, is when the screen is in landscape mode (orientation 1), the Touch is setup to the X and Y match the screen X, Y:
Where as the one I purchased later on, has what I currently call the Alternate or different configuration. The interesting thing here is, if you are in default rotation (0), or portrait mode the positions returned from the GT911 match the screen coordinates.
case 0:
touch_x = xRaw;
touch_y = yRaw;
break;
It would be great if a few people with older and newer displays would try running this
sketch on ArduinoCore-zephyr and see which configuration it has. And
with latest version of sketch if you type 0-3 in Serial monitor it will change the screen to that
orientation, and if you can touch the screen and the touchpaint appears to be tracking
correctly that would be great to know.
That matches my I believe newer one.
Both of mine show the 0.5...
I know that @Merlin513 one matches my older one as well.
Sorry I know we are spending a lot of time on some of this, but finding that playing with things like this help find and maybe hopefully resolve issues. giga_weather_display_v5-260911a.zip (121.9 KB)
Here is my current version of the Weather sketch...
Main screen:
Where you can click on buttons to type in new loactions.
Things so far with this sketch:
a) WiFi - One of my boards is much better at connecting...
b) I am using /storage/ file to save security data as well as Location information. - Issues with partitions, some bad block? Maybe difference between old or new board?
c) Touch Orientation.
d) Maybe Touch timing differences?
...
I thought would mention, that have found issues with differences between the two register configurations of the different Displays.
Orientation as I mentioned above..
Timing: does work differently in mentioned sketch. Needed to adjust a delay depending on configuration: I noticed in the Above dumps: The register:
8056: was different: Our original one 0x10, the Other config 0x5
From the GT911 programming guide it shows:
Which is different than register number from the Focus LCDs documents?