Arduino_GFX icon indicating copy to clipboard operation
Arduino_GFX copied to clipboard

Problems with Canvas

Open BenthamSoftwareServices opened this issue 5 months ago • 1 comments

I can use canvas with an ESP32 using Arduino IDE 2, with no problem, but simply changing the board from ESP32 to UNO causes build errors. I assume Arduino GFX should work with UNOs? I have tried using all the example code on your GitHub and website but nothing works with an UNO. The error message is:

C:\Users\Steven\AppData\Local\Temp.arduinoIDE-unsaved2024727-27780-ficl69.uuf1j\sketch_aug27a\sketch_aug27a.ino:46:94: error: cannot convert 'Arduino_GC9A01*' to 'Arduino_G*' in initialization Arduino_G output_display = new Arduino_GC9A01(bus, GFX_RES, 0 / rotation /, true / IPS /); ^ C:\Users\Steven\AppData\Local\Temp.arduinoIDE-unsaved2024727-27780-ficl69.uuf1j\sketch_aug27a\sketch_aug27a.ino:47:24: error: expected type-specifier before 'Arduino_Canvas_Indexed' Arduino_GFX gfx = new Arduino_Canvas_Indexed(240 / width /, 240 / height /, output_display, 0 / output_x /, 0 / output_y /, MAXMASKLEVEL / mask_level /); ^~~~~~~~~~~~~~~~~~~~~~ exit status 1 Compilation error: cannot convert 'Arduino_GC9A01' to 'Arduino_G' in initialization

The code is: Arduino_DataBus *bus = new Arduino_HWSPI(GFX_DC, GFX_CS); //create data bus class Arduino_G output_display = new Arduino_GC9A01(bus, GFX_RES, 0 / rotation /, true / IPS */); Arduino_GFX gfx = new Arduino_Canvas_Indexed(240 / width /, 240 / height /, output_display, 0 / output_x /, 0 / output_y /, MAXMASKLEVEL / mask_level */);

Help please.

BenthamSoftwareServices avatar Aug 27 '24 15:08 BenthamSoftwareServices