Abstract

This paper presents the ChArduino package which is designed to control the Atmel AVR microcontroller based Arduino boards through the C/C++ interpreter Ch. Traditionally, Arduino boards are programmed using the official Arduino IDE or lower-level AVR C libraries. These methods require specific cross-compilation tools to compile the code and upload it onto the board. Whenever a change is made to the source code, it needs to be recompiled and uploaded, making application development cumbersome, especially for beginners and as the size of the application grows. The approach presented in this paper is aimed at reducing the effort associated with code compilation, especially in classroom environments where microcontroller programming is first introduced. In fact, when using this method, code is executed in an interpreted manner and every function call is processed separately by the interpreter, thus compilation and uploading are not required to make changes effective. The ChArduino package consists of a library of functions running on a computer and a specialized firmware loaded onto the Arduino board. The firmware on the Arduino board is pre-compiled and the latest version is automatically uploaded at run time, if not already. At power-up, the firmware initializes the board and then waits for a command from the computer. The use of the C/C++ interpreter Ch also makes available line-by-line debugging, numerical analysis, and plotting capabilities. The supported communication protocols between the Arduino board and the computer are serial and Bluetooth. The application code written using this package is completely compatible with the entire spectrum of Arduino boards and can be ported to the Arduino IDE with minimal changes. The applications of the method described in this paper are general but apply especially to the K-12 education field in that the package creates a simple, user-friendly, environment for the absolute beginner to learn the basic principles of mechatronic systems including programming, microcontrollers, and electrical circuits. Lesson plans are being developed to use the ChArduino package in microcontroller introductory courses and the package is currently being introduced for preliminary testing in schools through the UC Davis C-STEM Center.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call