Flexible development environment for educational robotics Robotics is considered to be a powerful tool for teaching STEM especially when employing white-box platforms to build and program robots. In this context, programming environments should be simple and understandable for increasing the learning success and for easing the entry for teachers with non-informatics background. Furthermore, many robotics applications can also benefit from flexibility in the program deployment in contrast to the usual code-compile-download paradigm. To address these issues, this paper presents a flexible programming environment based on a layered robot control architecture, which involves the usage of mobile devices. Source code created on a smartphone or tablet can be downloaded to the robot controller, which organizes the programs having on-board compilation and execution environments. Besides, a versioning system adds to the comfort. The presented approach enables students to intuitively handle their robots, but can also be applied in more sophisticated scenarios where module-based flexible programming is required.