I am trying to use a 1.44' TFT display in my project, but i'm programming in c++ and i'm using an arduino library, with the arduino frameword. if I start the code with void Setup() the code runs perfectly, but if i change it to int main() it just dont work. i need to know what void setup() do differently of int main() or find a pure c++ library to this display. Many libraryes nor works with my IDE, im using visual studio code with platformIO extension. I tried to run many examples too, but i have better results with the simple ones, like print hello world on display, but all of this in arduino framework, if i change it, the screen just stay white forever.
Asked
Active
Viewed 19 times
-1
-
AFAIK there is no such thing as `main` for arduino. Your code normally is implemented in `loop()`. https://forum.arduino.cc/t/why-there-is-no-main-function/284675 – pptaszni Sep 01 '23 at 13:21
-
Not sure what is the issue, if you are using VSCode with PlatformIO, all you need to do is to setup the [platformio.ini](https://docs.platformio.org/en/latest/projectconf/) properly to use Arduino framework. – hcheung Sep 03 '23 at 00:53