openroberta-lab icon indicating copy to clipboard operation
openroberta-lab copied to clipboard

Code function block

Open philippmaurer opened this issue 5 years ago • 2 comments

Not all program tasks can be solved with the given NEPO blocks easily, especially when it is about custom sensors/actuators for Arduino based systems or bit operations.

Describe the solution you'd like I would like to suggest a block, with which you can create a function in your NEPO program, but define its code with textual code of the target system. (C/C++, Java, Python) This would give teachers or hardware developers the opportunity to create solutions for small problems that can not be solved with NEPO code and make its solution accessible for their students.

grafik

Being able to only provide a function evades possible problems with Python indenting and possible conflicts with other globally defined variables for all other languages. Concerning function parameters the NEPO syntax can be used.

philippmaurer avatar Feb 10 '20 13:02 philippmaurer

Possibly a duplicate to #121, but i could not get access to the linked google doc, so maybe it is, maybe not.

philippmaurer avatar Feb 10 '20 14:02 philippmaurer

no duplicate.

The old issue asks for fragments, that can be stored (currently only complete proprams can be stored) and "copied" into a program.

The new issue allows native code to be written for functions and is one way to add new functionalitiy (e.g. bit ops or in a limited way new sensors/actors) to the lab

rbudde avatar Feb 10 '20 14:02 rbudde