How to add a .cpp source file to my .ino project

I added another source file (common.cpp) and it references millis().
But I get error: “error: ‘millis’ was not declared in this scope”

Does common.cpp need a #include?

I added common.cpp by using build IDE upper right (+) button.

@douglaskbell, did you add a #include "Particle.h"; at the top of your .cpp file?

3 Likes