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
124 stars 118 forks source link

Some sensors of the Joycar robot don't work (i2c) #1605

Closed rbudde closed 5 months ago

rbudde commented 6 months ago

We got a message from a user togethr with 2 programs, that throw server errors when being used. The problem could be reduced to a program as attached 2024-01-08 17_55_41-Open Roberta Lab All sensors connected to the i2c bus show the same error (encoder, infrared, line). The reason is obvious. In class JoyCarPythonVisitormethod private void i2cCodeGeneration(ExternalSensor sensorBlock) the stmt String port = sensor.getProperty("PORT"); fails. The property doesn't exist. A name as defined in the variable portMapmust be returned.

Further notes: if you have a look into the configuration, all components of the i2c bus have port PORT. In the configuration xml the correct portMapnames can be found.