home Forums Feature Requests Arduino export. Reply To: Arduino export.


Tried SimpleDimmer.cpp in Arduino. This involved:

1. Unzip the sources.zip and moved the resulting fuzzylite-5.0/fuzzylite folder to the Arduino/libraries folder.

2. Moved the Headers.h file from fuzzylite/fl to fuzzylite since arduino only automatically looks in the top folders in the libraries folder for header files on startup.

3.Started Arduino and pasted SimpleDimmer.cpp into a new project.

4. Added #include <Headers.h> to the top of the SimpleDimmer.cpp file.

5. Clicked verify in Arduino and it tried to compile.

Problems look like:

In file included from /Users/michael/Documents/Arduino/libraries/fuzzylite/Headers.h:28:0,
from fuzzylitetest.ino:2:
/Users/michael/Documents/Arduino/libraries/fuzzylite/fl/fuzzylite.h:29:17: fatal error: cmath: No such file or directory
#include <cmath>
compilation terminated.
Error compiling.

The missing files are at least:

This might not be as bad as it looks. Some of these are called in console.h which is probably not needed on arduino. You probably have an idea where these are used.

Arduino doesn’t use the standard C++ libraries like string because they are to big. It does use other libraries instead. I haven’t tried locating and including the standard C++ files. May try that just to see how big it gets. The Arduino environment will compile it even if it’s to big to fit.

I’m no expert on porting C++ to arduino but there are many on the arduino sight who could help.

I might try to compile to the AVR just to see how big the code is.