home Forums Feature Requests Arduino export.

This topic contains 11 replies, has 4 voices, and was last updated by Juan Rada-Vilela Juan Rada-Vilela 2 years, 10 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1009

    Odox
    Participant

    Thanks Juan!
    It looks like you’ve worked a lot with this software. It looks promising and something I’ve been looking for a long time.
    I’m no genius on “typewriter programming” so thats why visual programming tools are very welcome.

    What I want is to be able to implement FuzzyLite code in the Arduino environment. Is it something that you think FuzzyLite be able to do in the future?

    Maybe it is possible to modify the C ++ code to fit the Arduino language. But so good is not my programming skills … yet.

    #1011
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi Odox,

    Thanks for your question. I hope to provide support for Arduino later this year. At the moment it is not possible given that operators new and delete and exceptions are not supported by Arduino. I already have an idea to work around such limitations, but it will take me some time to be able to export Arduino C++ code.

    #1013

    Odox
    Participant

    Nice Juan!
    I will follow the development of Fuzzylite whit great interest!

    #1536
    BobbInND
    BobbInND
    Participant

    Juan,

    I just found you site, and am bouncing off the walls! I noticed that you planned to provide a port to Arduino “later this year”, and was wondering where that stands. I am certainly willing to support the development by buying my license.

    #1539
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi Bobb,

    thank you for your post. I intended to work full-time or part-time in fuzzylite for the rest of the year, but I am still raising funds in order to be able to do so. At the moment, in my spare time, I am focused on releasing the updated version of jfuzzylite later this month.

    Cheers.

    #1555

    Mike
    Participant

    Juan,
    Found your site looking for Arduino fuzzy code. Great app!

    I am using Qtfuzzylite to figure out how to program Arduino code using the eFLL (Embedded Fuzzy Logic Library) at

    That library has a subset of your functionality. It should be easy to convert one of your formats to eFFL. I’m only using the stuff EFFL supports.

    FYI, if your not familiar with the Arduino and eFFL capabilities I was surprised to find their 3 input 1 output fuzzy example program on the lowly Arduino Uno only use 40% of program space and 20% of dynamic ram.

    #1556

    Mike
    Participant

    Couldn’t get the link to post. Here it is:

    https://github.com/zerokol/eFLL

    #1562
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi Mike,

    why would you want to use that library instead of fuzzylite?

    #1566

    Mike
    Participant

    Hi,
    The first is that is was setup for immediate use in the usual Arduino package so I could have a quick look.
    The second was that the Arduino Uno only has 32k of rom and 2k of ram. Thought I read that the fuzzylite required 300k for the library. I guess the whole library doesn’t end up on the arduino. I’ll look into it. That would be much better!

    thanks

    #1567
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi Mike,

    I had the idea you could not use fuzzylite in Arduino because there you cannot use the heap, that is, allocate objects with Object* o = new Object();.

    #1568

    Mike
    Participant

    Juan,
    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:
    cmath
    iostream
    sstream
    limits
    memory
    vector
    exception
    map
    string

    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.

    #1570
    Juan Rada-Vilela
    Juan Rada-Vilela
    Keymaster

    Hi,

    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.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.