I want to use only *.cpp
files and no *.ino
anymore. I read a lot of stuff about how to upload c++ instead of arduino sketches. But still I was not able to find a step by step guide how to do it.
Actually I am developing my sketch within Spacemacs (Emacs) and uploading it with Arduino-Makefile (https://github.com/sudar/Arduino-Makefile)
When I now want to start a new project with only *.cpp
and *.h
files to use classes etc. how would I start? Does anybody has the time to describe a rough step-by-step without the trivial stuff?
.ino
files are C++ files. You could just rename your main C++ file with the.ino
extension and compile it with the IDE or Sudar's Makefile. If you are not using the Arduino core library, a much simpler Makefile could do it.loop()
andsetup()
functions. I know I could write amain()
function instead but well...there must be some kind of conventional interface so the microcontroller knows what to start running. Or are those two "arduino" functions wrapped by amain()
function which just calls setup once and callsloop()
in a while-loop?