Math.h in Spark Dev [SOLVED]

I’m porting a library, using Spark Dev… having trouble with Math.h

I have tried:

#include <Math.h>


#include "Math.h"

Cannot get it to compile in the cloud…

Am I missing something?

Math.h: No such file or directory

You need a lowercase “m” in the name.

yeah tried that too…

I get:

and no other compiler errors…

What math function are you missing?
Quite a few of the standard math functions are already included via application.h direct or indirectly.

But when I try #include "math.h" in Spark Dev, my code compiles, so your above message might originate from some of your other code or “disallowed” files in your project folder (only .INO, .CPP & .H should be there).


just these few:

sin( )
cos( )
tan( )
acos( )
fabs( )

yup… I deleted keywords.txt


1 Like

side question…

Is there no available implementation of keywords in Spark Dev IDE?

I don’t have Spark Dev IDE here, but these all worked for (on floats) in the webIDE. I think your problem might be elsewhere.

This might be a question @suda could answer best.

yeah, the presence of my keywords.txt file was annoying the compiler… all better now.

Do you mean highlighting functions like sin()?

1 Like

Sort of, I meant similar to the arduino implementation where you can define special keywords that are highlighted differently in the IDE’s editor…

Your IDE does a nice job with highlighting functions constants, etc, so not really as important as other things, I suppose.

I’m just dealing with my own paradigm shift here…