I am migrating code, that works quite well, from an ESP32-S2 - 240x240 panel that uses sprites and TFT_eSPI to an ESP32 3.5" Touch with LovyanGFX. I started with a LovyanGFX sprite example called MovingCircles and the code runs fine.
So I stripped all the moving circles code out and inserted a couple of simple non-moving circles of my own, just to get them to appear on the screen. The code complies but I get a black screen.
I would very much appreciate help, even a reference I where I can learn about my issue. Thanks
With a great deal of effort, and trial and error, I figured this out. The reason is, I am not well-versed in C++ (although I am other languages). And because of this, the language in "Using LovyanGFX" sprites, while very good, is not verbose enough for someone at my skill level, so it is a bit vague. Last, I still can't find any reference that explains the very cryptic syntax around instances, aliases, and such, which is a but of a bummer because beyond those mysteries, writing code is relatively easy. Cheers!
Thanks much for your advice. I will check out your resources.
Truth to tell, I know Fortran, and interpreted, and compiled Basic very well (which is very C-like), and I get around C++ fairly well because of that. So continuing with C++ should not be a problem.
It is a bit odd that tutorials/YouTubes and the like actually skip over strange syntax such as "static TFT_eSprite sprite(&lcd)" and leap right to describing how to declare variables, use loops, etc, that, let's face it, most people already know.
... Not in my mind. Arduino was originally created for "regular" folks to be able to utilize microprocessors in projects. If you look over:
You will notice the BASIC language similarities.
Fortunately, C/C++ magic is required under-the-cover of the facade, so experienced coders often (usually) break out and use C++ which most likely confuses newcomers. Of course, with the backend GCC compiler and linker, even inline assembly is usable.
Most simple projects can be created with Arduino language. You will likely get some scorn when you post a sketch and ask for help; many of the more experienced members can be rather harsh about high-level commands and prefer to do direct port manipulation: but fail to remind that the code is not directly portable to different Arduino uC architectures.
Ex:
An INT on the Arduino is 16-bit, but on the Due, the INT is 32 bit.
Consult the reference, but feel free to expand if the standard commands are too slow or do not provide for your project needs.
Curious group I guess. In my years of experience as a geochemist and a publisher of numerical modeling code, I never hesitated to answer anyone's question, regardless how simple it would seem to me. So I think, because I know English, French pretty well, and some Spanish, I can get by well enough with Italian. So I can figure out C++.
hello Astrogeo, I would like to know how you managed to show the Sprites in Lovyangfx, I'm trying that same code and I can't get it to work, it presents the same black screen..... please if you can explain the correct way