Setting a pointer to NULL in Arduino library - error: ‘NULL’ was not declared in this scope
You should make sure your header includes the stddef.h header, which holds all these standard definitions (hence its name):

#include &lt;stddef.h&gt;