This example shows how to add more files (such as *.h
and *.cpp
) to a current Arduino project without making it into an Arduino library.
Example folder structure:
.
├── Makefile
├── main.ino
└── src
└── foo
├── foo.cpp
└── foo.h
#include "src/foo/foo.h"
void setup() {
SerialUSB.begin(9600);
while (!SerialUSB) { }
SerialUSB.println("Start!");
}
void loop() {
bar();
delay(2000);
}