Interpreter (php-like language) for arduino

Dear friends, hello!
Not long ago I became interested in the topic of industrial automation, but the topic is deep and complex, CODESYS alone is worth it, the tasks are not that difficult, certainly not commensurate with the difficulties that were expected when diving into this area.

The conclusion I came to is simple, I just need an interpreter built into my hardware, since tasks change every day, I would like to just take the script and upload it to a flash drive, then insert it into the hardware and make it work...

After searching, I found a bunch of basic similar interpreters, but somehow it’s not at all close to me, and I was looking for something similar to PHP, since web programming is much more my area than what I have to do now.

In short, after searching, I found this on github:

The interpreter is perfect for all tasks, except for one thing, there is no way to create custom functions, otherwise it is simply excellent!

I ask for help from experts, please help me integrate the ability to create custom functions.

Sample code:

//Условия
$sammer[1] = "tree"; if($sammer[1] == "treex"){ pre("hello"); } if($sammer[1] == "tree"){ print("hello world");}

//Массивы
$sammer[1] = 13; $sammer[2] = "hello world";  print($sammer[2]); print($sammer[1]);


//Циклы
$i = 0; while($i < 10){$i = $i+1; pre($i); }

By the way, the compile() function converts this string

$sammer[1] = "tree"; if($sammer[1] == "treex"){ pre("hello"); } if($sammer[1] == "tree"){ print("hello world");}

Here’s a line with a set of commands that is understandable to the interpreter:

"tree"SV0000GV0000"treex"_A=IF#G0017"hello"_PRGV0000"tree"A=IF#G002a"hello world"_PR

Hi @nmdonsk,

welcome to the arduino-forum.

You have provided quite some information. Though you haven't provided any kind of detail-information what kind of functionality you want to have in the end.

Do you want

  • to process user-inputdata to a different format?
  • to create some kind of PLC-control?
  • simply display received data in different layouts?

no idea what you really want!

So far if somebody shall help you this helper would have to dig through all the way of how this interpreter works and what this interpreter can do. = reading all the documentation or analysing the code in detail.

unloading this whole work on the shoulder of your potential helpers is IMHO very demanding.
You are the one who wants help.
So you should summarise how this interpreter works by providing some easy to understand examples.

@nmdonsk
If you are going to use Arduino boards in your devices, it will be much more efficient to find a programmer on your team and write code in C than to develop your own interpreter

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.