Prevent Linter errors


There’s a way to prevent this errors without add Arduino.h to each file?

'millis' was not declared in this scope
'byte' was not declared in this scope

I have Arduino.h included on first file and build works very well.

Best regards.

This is a problem of Arduino and its INO syntax. They messy people and learn them how to write invalid C/C++ code. Please use include guards. See include guard - Wikipedia


I have #pragma once to every header file now.

But the problem is not the file being included multiples times.

The problem is Linter doesn’t look to all files as a single project. It just look for current tab.

So I have all this errors.

Best regards.

See comparison table here (scroll down) A professional collaborative platform for embedded development · PlatformIO

Atom is not intended for advanced C/C++ development. Please switch to PlatformIO IDE for VSCode.


Thanks for your reply.

I have installed VSCode but, now I have others errors. :smiley:

This errors came from?

Best regards.

So the problem has no solution for now.
I have a big amount of errors with Linter and another big amount with IntelliSense.
The problem with IntelliSense was related here: AVR Assembler Errors (i.e. Arduino) · Issue #2377 · microsoft/vscode-cpptools · GitHub

As I remember, you can disable some files from linting. We can’t help here while this issue depends on Microsoft C/C++ extension. Sorry.