I would like to compile and upload a sketch on my board, but my issue is that the folder i got from github does not contain a ".ino" file like i'm used to, only 2 ".cpp" files and a " .h" file...
I am unsure how to proceed when that is the case.
I am sure it is meant for arduino IDE as the beginning of the main.cpp goes like that:
What does the rest of the .cpp look like? If it looks like Arduino code, just rename it *.ino and see what happens.
Also, make sure it's not .CCCP might be Russians using your Arduino to do nefarious things.
Arduino "sketches" in the .ino format must contain the setup() function and the loop() function to be accepted by the IDE. Does any of your files contain those?
Not true. If a sketch contains an 'int main()' function, as does a regular C/C++ program, it will compile without error. It won't automatically initialize the Arduino libraries so Arduino functions can't be used unless you add your own calls to init() and initVarient().
Looks like @lefab514 is yet another "Hit-and-Run Question-Asking Newbie". There have been 10 replies to the original question and no further information coming from OP. Why do they bother asking?
compiles indeed, even with the extention .ino. Good to know. So the IDE initialises the Arduino stuff only when it sees setup & loop and defaults to manual otherwise, or something like that? I never quite figured out what exactly that IDE does behind your back, actually.
I think what happens is that the linker sees that "int main()" is already defined so it doesn't link in the "main.cpp" object file from the Arduino core. Without that file, there is no Arduino initialization and no references to setup() or loop(). Since there are no references, there is no error when they are not defined.
Note: You can have a setup() and/or loop() along with your own "int main()", but they will not be used since the Arduino main.cpp isn't there to call them.
THX, I did grab that from a unverified website, not tha e source code on my machine.
And I wondered about the weak thing, seems like something you would always want to have to make explicit… expected to see how that was done for main.c.
Created a folder for it with the same name and put the new generative_sequencer.ino fiile inside and moved that folder to my neotrellis examples folder inside libraries: