I hope this is just a mistake on my part... but...
My issues are:
// Notes:
// - text always orients correctly for all setRotation(x)
// - printed coordinates are correct to the touch-ed location for all setRotation(x)
// Issues:
// - in setRotation(), same as setRotation(0)
// - in setRotation(0), KEY1 bottom, "left-right" and "up-down" are correct
// - in setRotation(1), KEY1 right, "left-right" registers as "top(0)-bottom(off screen 239)" and "top-bottom" registers as "right(134)-left(0)"
// - in setRotation(2), KEY1 top, "left-right" registers inversely as "right(135)-left(0)" and "top-bottom" registers inversely as "bottom(239)-top(0)"
// - in setRotation(3), KEY1 left, "left-right" registers as "bottom(off screen 239)-top(0)" and "top-bottom" registers "left-right(134)"
// - swapping coordinates by changing touch.read(x, y) to touch.read(y, x)...
// - in setRotation(0), KEY1 bottom, "left-right" registers incorrectly as "top-half(134)" and "top-bottom" registers incorrectly as "left(0)-right(off screen 239)"
// - in setRotation(1), KEY1 right, "left-right" registers correctly as "left-right" but "top-bottom" registers inversely as "bottom-top"
// - in setRotation(2), KEY1 top, "left-right" registers incorrectly as "top(0)-half-down(134)" and "top-bottom" registers as "lright(offscreen 239)-left(0)"
// - in setRotation(3), KEY1 left, "left-right" registers inversely as "right-left" BUT "top-bottom" registers correctly as "top-bottom"
My board support and libraries are this:
// BOARD: Arduino Nesso N1
// CORE: esp32 by Espressif Systems v. 3.3.6
// LIBRARY: Arduino_Nesso_N1 by Arduino v. 1.0.0
Using this Arduino copy/pasted code from here: https://docs.arduino.cc/tutorials/nesso-n1/user-manual/#handling-touch-input
// https://docs.arduino.cc/tutorials/nesso-n1/user-manual/#handling-touch-input
// BOARD: Arduino ESP32 Boards by Arduino v. 2.0.18-arduino 5
// LIBRARY: Arduino_Nesso_N1 by Arduino v. 1.0.0
// Issues:
// - text always orients correctly for all setRotation(x)
// - in setRotation(), same as setRotation(0)
// - in setRotation(0), KEY1 bottom, "left-right" and "up-down" are correct
// - in setRotation(1), KEY1 right, "left-right" registers as "top(0)-bottom(off screen 239)" and "top-bottom" registers as "right(134)-left(0)"
// - in setRotation(2), KEY1 top, "left-right" registers inversely as "right(135)-left(0)" and "top-bottom" registers inversely as "bottom(239)-top(0)"
// - in setRotation(3), KEY1 left, "left-right" registers as "bottom(off screen 239)-top(0)" and "top-bottom" registers "left-right(134)"
// - swapping coordinates by changing touch.read(x, y) to touch.read(y, x)...
// - in setRotation(0), KEY1 bottom, "left-right" registers incorrectly as "top-half(134)" and "top-bottom" registers incorrectly as "left(0)-right(off screen 239)"
// - in setRotation(1), KEY1 right, "left-right" registers correctly as "left-right" but "top-bottom" registers inversely as "bottom-top"
// - in setRotation(2), KEY1 top, "left-right" registers incorrectly as "top(0)-half-down(134)" and "top-bottom" registers as "lright(offscreen 239)-left(0)"
// - in setRotation(3), KEY1 left, "left-right" registers inversely as "right-left" BUT "top-bottom" registers correctly as "top-bottom"
#include <Arduino_Nesso_N1.h>
NessoDisplay display;
NessoTouch touch;
void setup() {
display.begin();
touch.begin();
display.setRotation(1); // 0 = KEY1 bottom, 3 = KEY1 left
display.fillScreen(TFT_BLACK);
display.setTextDatum(MC_DATUM);
display.setTextColor(TFT_WHITE);
display.setTextSize(1);
display.drawString("Touch the screen", display.width() / 2, display.height() / 2);
}
void loop() {
int16_t x, y;
if (touch.read(x, y)) { // Check for screen touch
display.fillScreen(TFT_BLACK); // Clear screen
display.fillCircle(x, y, 5, TFT_WHITE); // Draw circle at touch point
String coords = "X:" + String(x) + " Y:" + String(y);
display.drawString(coords, display.width() / 2, display.height() / 2); // Display coordinates
}
delay(20); // ?
}
I tried drawing the problems, but the arrows, dots, and words became a rats nest soup. A video was even worse (gnarled knuckles).
Did ESP32 core update break again?
Did Arduino_Nesso_N1 library update break?
Did NessoTouch break?
Note: M5 and M5Unified libraries work as expected.
I will use M5 library for touch ): to continue with Nesso things.