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
125 stars 121 forks source link

Server error when generating a colour via a function #1331

Closed el-voss closed 1 year ago

el-voss commented 2 years ago

Hello,

I wanted to program a colour wheel in the roberta lab for an Arduino Uno with an RGB LED. For this I coded a function, that takes a number as an argument and gives back a colour. But when I try to use this function in the loop, I get a "server error". The program is attached below. I tried it with firefox and chromium.

Steps to reproduce:

  1. Import the program below.
  2. Open the code view (will not be opened, but show a server error instead) or press the "play" button.

farbrad-rgb-led.zip

RaghuvirShirodkar commented 2 years ago

This is an issue for arduinos, mbot and sensebox. There is also a problem when trying to use the following blocks for arduinos:

Image

Here is the programdgH%22%20intask=%22true%22%3E%3Cmutation%20datatype=%22Array_Colour%22%3E%3C/mutation%3E%3Cfield%20name=%22VAR%22%3Eitem%3C/field%3E%3C/block%3E%3C/value%3E%3C/repetitions%3E%3C/block%3E%3C/instance%3E%3C/block_set%3E%3C/program%3E%3Cconfig%3E%3Cblock_set%20xmlns=%22http://de.fhg.iais.roberta.blockly%22%20robottype=%22arduino%22%20xmlversion=%223.1%22%20description=%22%22%20tags=%22%22%3E%3Cinstance%20x=%22138%22%20y=%2288%22%3E%3Cblock%20type=%22robConf_led%22%20id=%221%22%20intask=%22true%22%3E%3Cfield%20name=%22NAME%22%3EL%3C/field%3E%3Cfield%20name=%22INPUT%22%3ELED_BUILTIN%3C/field%3E%3C/block%3E%3C/instance%3E%3Cinstance%20x=%22250%22%20y=%22250%22%3E%3Cblock%20type=%22robConf_robot%22%20id=%22robot%22%20intask=%22false%22%20deletable=%22false%22%3E%3Cfield%20name=%22ROBOT%22%3Eundefined%3C/field%3E%3C/block%3E%3C/instance%3E%3Cinstance%20x=%2216%22%20y=%22459%22%3E%3Cblock%20type=%22robConf_rgbled%22%20id=%22tO%7B~_Z~E%5DB?l%5B,:H!%5DU=%22%20intask=%22true%22%3E%3Cfield%20name=%22NAME%22%3ER%3C/field%3E%3Cfield%20name=%22RED%22%3E5%3C/field%3E%3Cfield%20name=%22GREEN%22%3E6%3C/field%3E%3Cfield%20name=%22BLUE%22%3E3%3C/field%3E%3C/block%3E%3C/instance%3E%3C/block_set%3E%3C/config%3E%3C/export%3E>) tested on current develop.

The fix needs changes to repo arduino-resources as well, since NEPODefs.h needs a function overload.

bjost2s commented 1 year ago

resolved