Magic 8-Ball Demo

Lesson Details:
July 10, 2020


I: Introduction

A. I have been a programmer for almost 2 years now, and have used many programming languages both in school and for personal use. I have been using an AVR MEGA 2560 for my school robotics projects. In the past, I have been using it with Arduino IDE to program it with C/C++. While this is a very good way to program the chip, the Arduino IDE is not designed specifically for AVR architecture, and thus lacks many features that would make life easier. Therefore, I began searching for a better solution.

II: Body

A. I found that solution with a command line based AVR compiler called avr-gcc, which is a part of the AVR toolchain. The toolchain is basically a collection of programs that compile AVR code into executable format. It is possible to create a Makefile to automate the compilation of code, as well as adding features such as configuration files for different types of chips, etc.

B. But, since avr-gcc was designed for professional programmers and lacked a GUI, I found it hard to use for just hobby programming. So then I looked into Arduino-core , which was essentially a fork of the Arduino IDE, but built on the new AVR-core framework. Since I had already programmed with Arduino IDE before, it was easy to transition to Arduino core (now known as SAMD Core) because it still had the same syntax and structure as Arduino IDE.

C. The SAMD Core programming language is based on C/C++ syntax, yet has some minor changes such as all variables must be initialzed upon creation; no C-style arrays; and some different header file syntax (for more information on these differences see here). I had never programmed in C/C++ before, and therefore found this annoying, but once you get used to it, it is not too difficult.

III: Conclusion

loader
Course content