When I start a new Arduino project, i would prefer the template be the main.cpp found in the arduino cores directory (i.e. based on main() instead of setup() & loop().). I’ve searched everywhere and cannot find out how to do this…
I did learn how to use snippets… a pretty cool feature; but I would still prefer it if I could somehow change the starting template.
I wonder who put the code there in the first place - EVERY NEW project has this in the main.cpp:
#include <Arduino.h>
// put function declarations here:
int myFunction(int, int);
void setup() {
// put your setup code here, to run once:
int result = myFunction(2, 3);
}
void loop() {
// put your main code here, to run repeatedly:
}
// put function definitions here:
int myFunction(int x, int y) {
return x + y;
}
Where does this code come from … I’m NOT aware of typing that at any time !