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,
/Users/michael/Documents/Arduino/libraries/fuzzylite/fl/fuzzylite.h:29:17: fatal error: cmath: No such file or directory
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.
thanks for reporting your experience on fuzzylite and arduino.
I do not know exactly where the files you mention are used, but I am pretty sure I am using them in many places. The header files that will be certainly required are: cmath, limits, vector, exception, map, string. As for the remaining ones, there might be some kind of workaround, but I do not know.