How low can you go?

When writing code for a microcontroller, there are a number of languages and development tools available to you. You must choose which tools to use. You can choose to go as low level as printing PCBs, or use a high level language like Python or Haskell.

cmake vs Arduino IDE

When writing code for an Arduino, you can use the Arduino IDE and write in a C-like language. You can also write C code directly, and then manually flash the code onto the device. Flashing C code onto the device directly is significantly more difficult to get set up than using the Arduino IDE - so why should we go to the extra effort?


When the Arduino IDE loads a program onto your microcontroller, it includes a number of libraries that are what allow you to write in the simplified Arduino C-like language. This causes a significant impact on boot times and can also induce a slow down at runtime, especially when compared to optimized C code. Additionally, these extra libraries eat up the limited amount of program memory you have on your device. While for most creative applications, the Arduino IDE will suffice, if you find yourself running into computation or memory bottlenecks, it may be time to investigate settings up a more direct compilation chain using C.


In general, high-level languages introduce bloat to handle the abstractions made available to you. At this point, memory is cheap enough, and most compilers are optimized enough that this will not be a meaningful consideration.