Idea: Forth frontend at Arduino-side? - "Forth" as communication protocol

Hi all,

when I was doing a Project with Yun these days, I soon came into trouble because of the ram and flash limitations of the "Leonardo-side" of the Yun. I was forced to reinvent a library and I am now at >99% of Flash, so I cannot easily improve my project anymore.

Therefore I am in search how to shift the workload to the Linux-side and use the "leonardo-side" as intelligent front-end. (I would prefer to use gcc on the Linux-side.)

Because I want to use the adafruit rgb-lcd via i2c and some sensors, I want to use the corresponding libraries.

I have found, that there is the Firmata protocol, but with this the arduino is only a IO-chip, as far I understand.

So now I came to the idea, it would be nice to have a tiny forth System in the Leonardo-side, which listens to the Linux-side and interprets, what to do. Giving back results. (While I have been allways fascinated by Forth, I allways thought, there are languages which can be read much more easily...) But here we want an Interpreter and have got a small System, so forth could make sense here.

The ideal forth should: 1. Be an arduino-sketch (source), where new words could be added based on existing arduino-libraries. 2. Be small (Flash), ram 3. Be not too complicated to be changed. 4. New words should compile into eeprom because of the limited space in ram. 5. Be a somewhat "complete" System.

So far I have found: * Amforth, EForth_328 and ceforth_328. These 3 Systems cannot easily be brought to use arduino libraries because they use an additional toolchain. * FlashForth: Has nothing to do with arduino-ide but has got Multitasking and supports Interrupts. * FINF is a very small subset of forth. * YAFFA: seems to be a complete System, compiles into ram.

Questions: Is there an additional forth to consider? Has someone done something in this direction? Do think, this idea makes sense?

Many thanks! Christof

Wouldn't it be much easier to use Python on the Linux side to deal with the Arduino side in exactly the same way as a Python program on a PC would work with an Uno ?

...R

Robin2: Wouldn't it be much easier to use Python on the Linux side to deal with the Arduino side in exactly the same way as a Python program on a PC would work with an Uno ?

...R

Well, one way to do this, is to use firmata. Forth gives the possibility to let the arduino do small Tasks.

How about forth back end on the Linux side with forth front end at 32U4?

4th - 3.61.5-1 - 4th forth compiler at Yun

http://forum.arduino.cc/index.php?topic=309294.0

:stuck_out_tongue:

cebersp: Well, one way to do this, is to use firmata. Forth gives the possibility to let the arduino do small Tasks.

If you like Forth, please pursue the idea. But for most folk it is easier to do small tasks with the normal Arduino C/C++

...R