Hi. I'm trying to include Math.h in my project because I need to use some of its more complex trig functions. But I cannot seem to find where I can download it or at least copy it to create a library in the Arduino IDE... Does anyone have any guidance on that? I have found the avr-libc page where it explains it, I just don't know how to get the actual code for the .h the .cpp files. Any guidance would be greatly appreciated. Thanks!
I'm trying to include Math.h in my project
First, you might try including math.h, instead.
Second, you might try telling us what OS you are using.
Third, you might try telling us HOW you are (trying to) including the file.
Fourth, you might try telling us what problem you are having as a result of including the file.
First: I have tried using math.h
Second: I have an Arduino Uno
Third: I just tried to use #include at the top of my sketch (but I knew it wouldn't work without downloading the file and importing it - I can't find the .h and .cpp files to download)
Fourth: I don't get an error when I try to include it. It just doesn't even recognize math.h as a library (doesn't color it) and it won't let me use its functions
Second, you might try telling us what OS you are using.
Second: I have an Arduino Uno
Is your UNO running Windows 7, XP, Mac 10.6.1, Ubuntu?
Third: I just tried to use #include at the top of my sketch (but I knew it wouldn't work without downloading the file and importing it - I can't find the .h and .cpp files to download)
math.h is included with the operating system. It does not have to be downloaded. The matching object file is also part of the OS.
It just doesn't even recognize math.h as a library (doesn't color it)
No surprise. And no relevance.
and it won't let me use its functions
How is it preventing you from using its functions?
In fact you have a math.h pre-compiled for avr in the avr-gcc provided with the Arduino IDE, just #include <math.h>
Okay. Thank you. I am running Windows 7. The functions are sometimes color coded and other times not. I assume from your reaction to my previous statement about color coding math.h that it doesn't matter whether or not it automatically colors it. I am very new and every library I had included to this point made its corresponding functions color coded. If, say, "cos" goes orange but "tanh" doesn't, does that matter?
The color coding is done reading a file that says what words should be colored, but only some functions are in that file, so not even half of all the provided functions by the avr-libc functions will ever be colored, see this and save the link:
http://www.nongnu.org/avr-libc/user-manual/group__avr__math.html
Okay great. Thank you so much. I can finally get back on track. Have a great weekend.