Was using the Adafruit TFT FeatherWing 3.5" 480x320 Touchscreen (Version 1) with an Adafruit HUZZAH32 ESP32 Feather Board and found a mapping error in two example files.
For: examples/touchpaint_featherwing/touchpaint_featherwing.ino
Line 156
p.x = map(p.x, min_x, max_x, 0, tft.width());
should be
p.x = map(p.x, min_x, max_x, tft.width(), 0);
For: examples/gfxbuttontest_featherwing/gfxbuttontest_featherwing.ino
Line 266
int py = map(p.x, max_x, min_x, 0, tft.height());
should be
int py = map(p.x, min_x, max_x, 0, tft.height());
For both example files, the correct file for the Version 1 screen had been selected:
// If using the rev 1 with STMPE resistive touch screen controller uncomment this line:#include <Adafruit_STMPE610.h>// If using the rev 2 with TSC2007, uncomment this line://#include <Adafruit_TSC2007.h>
Was using the Adafruit TFT FeatherWing 3.5" 480x320 Touchscreen (Version 1) with an Adafruit HUZZAH32 ESP32 Feather Board and found a mapping error in two example files.
For: examples/touchpaint_featherwing/touchpaint_featherwing.ino Line 156
p.x = map(p.x, min_x, max_x, 0, tft.width());
should bep.x = map(p.x, min_x, max_x, tft.width(), 0);
For: examples/gfxbuttontest_featherwing/gfxbuttontest_featherwing.ino Line 266
int py = map(p.x, max_x, min_x, 0, tft.height());
should beint py = map(p.x, min_x, max_x, 0, tft.height());
For both example files, the correct file for the Version 1 screen had been selected:
// If using the rev 1 with STMPE resistive touch screen controller uncomment this line:
#include <Adafruit_STMPE610.h>
// If using the rev 2 with TSC2007, uncomment this line:
//#include <Adafruit_TSC2007.h>