Replies: 1 comment 1 reply
-
The library is intended for use with 32 bit processors and the Mega is 16 bit, so will struggle to run this library as it is quite memory hungry. It seems the drawArc function is not compatible with a 16 bit processor, I am not sure why. So at the moment the options are to upgrade to a supported 32 bit processor, or see if the Adafruit_GFX library can be used with your display. Not very helpful I know. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off, thanks for this library. TFT_eSPI and LDCWIKI have been the only ones I have been able to get to work. I have tried just about every other one mentioned in posts discovered over two solid days of research.
I am using a 3.5 inch red back IPI9488 display on a mini Mega 2560 clone. It runs the test programs. When I tried the drawArc call I did not get the desired results. The drawSmoothArc routine just draws the end pieces of the arc. drawArc only seems to want to draw a half circle. The arc demo just draws a lot of half circles.
Here is the routine:
`void drawMyScreen()
{
int x1, y1;
int x2, y2;
int x3, y3;
int32_t xC = 240, yC = 160, rad = 100, irad = 105, orad = 115;
uint32_t startAngle, endAngle, fg_color, bg_color;
bool xyswap = 0, xflip = 0, yflip = 0;
startAngle = 0;
endAngle = 310;
fg_color = TFT_WHITE;
bg_color = TFT_GREEN;
// Clear the screen
tft.fillScreen(TFT_BLACK);
// Show the screen prompt
// drawPrompt();
tft.drawCircle(xC, yC, rad, TFT_BLUE);
tft.drawSmoothArc(xC, yC, orad, irad, startAngle, endAngle, fg_color, bg_color, true);
tft.drawArc(xC, yC, orad, irad, startAngle+30, endAngle+30, bg_color, bg_color, true);
while (getCoord()); // This waits for the centre area to be touched
// drawCross(HRES/2, VRES/2, TFT_BLACK);
Serial.print("Second point : Raw x,y = ");
Serial.print(X_Raw);
Serial.print(",");
Serial.println(Y_Raw);
// drawCross(HRES-30, VRES-30, TFT_RED);
while (!getCoord()); // This waits until the centre area is no longer pressed
delay(10); // Wait a little for touch bounces to stop after release
getCoord();
// drawCross(HRES-30, VRES-30, TFT_BLACK);
Serial.print("Third point : Raw x,y = ");
Serial.print(X_Raw);
Serial.print(",");
Serial.println(Y_Raw);
x2 = X_Raw;
y2 = Y_Raw;
}`
Thanks for any help,
Bob
Beta Was this translation helpful? Give feedback.
All reactions