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

microseconds and direct pin control #256

Open vonende opened 4 years ago

vonende commented 4 years ago

Hello, a student of mine is developing an experiment. She wants to measure the time for a falling ball with infrared sensors and an arduino. The Problem is, that Roberta Lab just provides milliseconds. Microseconds would be better to improve accuracy, which is really bad at the moment. So is there a chance to get a microseconds-block in Roberta Lab? Another student wanted to program a moving light like k.i.t.t from Knight Rider. It was annoying to declare all the LED in the robot control and to copy the same routine for every LED. It would be much smarter to use a loop and access every LED/PIN through a number. Thank you.

bjost2s commented 4 years ago

Seems to be two different questions ;-) For micoseconds is doable in general. I think we should simply add a drop-down to the timer block.

For the LEDs I would recommend to save the configuration and reuse it, so that the effort only have to be done once. For the program it could be helpful two write once two helper function and reuse them: image