On the Design and Implementation of a Virtual Machine for Arduino

Arduino has become one of the most popular platforms for building electronic projects, especially among novices. In the last years countless tools, environments, and programming languages have been developed to support Arduino. One of these is Physical Et

  • PDF / 283,837 Bytes
  • 12 Pages / 439.37 x 666.142 pts Page_size
  • 32 Downloads / 155 Views

DOWNLOAD

REPORT


Abstract Arduino has become one of the most popular platforms for building electronic projects, especially among novices. In the last years countless tools, environments, and programming languages have been developed to support Arduino. One of these is Physical Etoys, a visual programming platform for robots developed by the authors. Physical Etoys supports compiling programs into the arduino. For this to work, a Smalltalk to C++ translator has been built. Although it has been very useful, this translator has brought a new set of issues. In this paper we will discuss some of these problems and how we decided to overcome them by developing a simple virtual machine that will be used as the base for the new Physical Etoys.



Keywords Arduino Programming language Concurrency Physical etoys





Virtual machine



1 Introduction Since the emergence of the Arduino board, the world has seen a significant increase in the amount of people without technical training (artists, designers, hobbyists) that have started to explore the world of microcontroller programming. The educational field has not been exempt of this trend. Following the movement that promotes G. Zabala (✉) ⋅ R. Moran ⋅ M. Teragni ⋅ S. Blanco Universidad Abierta Interamericana, Buenos Aires, Argentina e-mail: [email protected] R. Moran e-mail: [email protected] M. Teragni e-mail: [email protected] S. Blanco e-mail: [email protected] © Springer International Publishing Switzerland 2017 M. Merdan et al. (eds.), Robotics in Education, Advances in Intelligent Systems and Computing 457, DOI 10.1007/978-3-319-42975-5_19

207

208

G. Zabala et al.

teaching programming and computer science in schools, robotics offers a highly motivational medium to introduce concepts from several disciplines. Furthermore, the amount of knowledge necessary to carry out small to medium size robotic projects is increasingly smaller. The Arduino board, being open hardware and low cost, invites students from all over the world to embark on the adventure of educational robotics. The Arduino platform provides a simplified environment (based on the C++ programming language) in which most of the advanced microcontroller concepts are hidden away from the user. However, this environment is still too complex for some of the most inexperienced users, especially young children. One of the main issues we found while teaching robotics to high school students is the limited support for concurrency in the Arduino programming language. Robotics competitions and exercises usually require the coordination of several concurrent tasks to achieve a goal. For instance, a common competition is the robot-sumo, in which two robots try to push each other out of a circle. This competition involves performing two simultaneous tasks: finding the opponent, and avoiding being pushed out of the circle. Other competitions involve more complex tasks. Most of the students participating in this kind of activities struggle to specify the concurrent behavior and as a result their robots pe