Skip to main content
replaced http://arduino.stackexchange.com/ with https://arduino.stackexchange.com/
Source Link

See my post about How the IDE organizes thingsHow the IDE organizes things.

Also see my page about how to avoid the quirks of the IDE sketch file pre-preprocessing.

You can certainly manage without .ino files. As Edgar Bonet says, they are really C++ files with certain pre-processing (see link above).

but what about these loop() and setup() functions

Effectively, the Arduino IDE supplies a main function that looks like this:

int main ()
  {
  init ();    // initialize hardware, including timers and timer interrupts
  setup ();   // user setup
  while (true)
    loop ();  // stuff to be done repeatedly
  return 0;   // this will never be executed
  }

(It's slightly more complex, to allow for USB where applicable, but that is the idea).

But still I did not found the step by step guide how to do it.

I'm pretty sure there are a lot of example "make" files around which show the idea.

I have an example herehere.

See my post about How the IDE organizes things.

Also see my page about how to avoid the quirks of the IDE sketch file pre-preprocessing.

You can certainly manage without .ino files. As Edgar Bonet says, they are really C++ files with certain pre-processing (see link above).

but what about these loop() and setup() functions

Effectively, the Arduino IDE supplies a main function that looks like this:

int main ()
  {
  init ();    // initialize hardware, including timers and timer interrupts
  setup ();   // user setup
  while (true)
    loop ();  // stuff to be done repeatedly
  return 0;   // this will never be executed
  }

(It's slightly more complex, to allow for USB where applicable, but that is the idea).

But still I did not found the step by step guide how to do it.

I'm pretty sure there are a lot of example "make" files around which show the idea.

I have an example here.

See my post about How the IDE organizes things.

Also see my page about how to avoid the quirks of the IDE sketch file pre-preprocessing.

You can certainly manage without .ino files. As Edgar Bonet says, they are really C++ files with certain pre-processing (see link above).

but what about these loop() and setup() functions

Effectively, the Arduino IDE supplies a main function that looks like this:

int main ()
  {
  init ();    // initialize hardware, including timers and timer interrupts
  setup ();   // user setup
  while (true)
    loop ();  // stuff to be done repeatedly
  return 0;   // this will never be executed
  }

(It's slightly more complex, to allow for USB where applicable, but that is the idea).

But still I did not found the step by step guide how to do it.

I'm pretty sure there are a lot of example "make" files around which show the idea.

I have an example here.

Source Link
Nick Gammon
  • 38.9k
  • 13
  • 70
  • 126

See my post about How the IDE organizes things.

Also see my page about how to avoid the quirks of the IDE sketch file pre-preprocessing.

You can certainly manage without .ino files. As Edgar Bonet says, they are really C++ files with certain pre-processing (see link above).

but what about these loop() and setup() functions

Effectively, the Arduino IDE supplies a main function that looks like this:

int main ()
  {
  init ();    // initialize hardware, including timers and timer interrupts
  setup ();   // user setup
  while (true)
    loop ();  // stuff to be done repeatedly
  return 0;   // this will never be executed
  }

(It's slightly more complex, to allow for USB where applicable, but that is the idea).

But still I did not found the step by step guide how to do it.

I'm pretty sure there are a lot of example "make" files around which show the idea.

I have an example here.