You must have a really old version of the library. Also not sure why it is inside of Adafruit_ili9341 directory.
Note: The current versions are installed by Teensyduino in the <where you install arduino>/hardware/teensy/avr/libraries/ili9341_t3
Which is not used here. Also note I mostly use my own version ili9341_t3n (https://github.com/kurte/ili9341_t3n)
Note: Our libraries don't use the Canvas stuff of Adafruit.
But the ili9341_t3n has an ability to turn on a frame buffer and do writes through it, where you then tell the screen to update...
For example this sketch works:
Code:
#include <ILI9341_t3n.h>
const uint16_t tft_Color_Black = 0x0000;
const uint16_t tft_Color_Blue = 0x001F;
const uint16_t tft_Color_Red = 0xF800;
#define TFT_CS 10
#define TFT_DC 9
#define TFT_RST 8
ILI9341_t3n tft = ILI9341_t3n(TFT_CS, TFT_DC, TFT_RST);
void setup() {
delay(250);
tft.begin();
tft.setFont();
tft.fillScreen(tft_Color_Black);
tft.setRotation(0);
}
int loop_count = 0;
void loop() {
loop_count++;
if (loop_count & 1) {
tft.useFrameBuffer(0); // make sure frame buffer is turned off.
tft.drawTriangle(0, 0, 240, 0, 120, 320, ILI9341_RED); // This works fine
tft.fillTriangle(0, 0, 240, 0, 120, 272, ILI9341_BLUE); // This is what stops halfway down screen.
} else {
tft.useFrameBuffer(1);
tft.drawTriangle(0, 0, 240, 0, 120, 320, ILI9341_BLUE); // This works fine
tft.fillTriangle(0, 0, 240, 0, 120, 272, ILI9341_RED); // This is what stops halfway down screen.
tft.updateScreen();
}
delay(250);
}
It shows it alternating from use frame buffer or not using frame buffer. Ana I alternate which color is use for fill and draw...