Getting "not declared in this scope" errors only after build

You didn’t show the whole source file. Is #include <Arduino.h> at the start, which is mandatory for C++ Arduino programs?

1 Like