OpenRoberta / openroberta-lab

The programming environment »Open Roberta Lab« by Fraunhofer IAIS enables children and adolescents to program robots. A variety of different programming blocks are provided to program motors and sensors of the robot. Open Roberta Lab uses an approach of graphical programming so that beginners can seamlessly start coding. As a cloud-based application, the platform can be used without prior installation of specific software but runs in any popular browser, independent of operating system and device.
Apache License 2.0
123 stars 118 forks source link

Code function block #738

Open philippmaurer opened 4 years ago

philippmaurer commented 4 years ago

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 commented 4 years ago

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

rbudde commented 4 years ago

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