Which programming languages can I use with STM32?

You can write programs in C and C++. Leafony’s AP03 STM32 MCU is intended for development with Arduino IDE or STM32CubeIDE.

An Arduino program is called a “sketch.” A sketch in an .ino file is compiled as a C++-based program. Knowledge of variables, conditions, loops, and functions learned in C is useful here too.

  • setup(): Runs once at startup. Use it to initialize sensors, communication, and other settings.
  • loop(): Runs repeatedly afterward. Use it for tasks such as reading sensors and sending data.

If you are new to this, set up the development environment and libraries and board definitions, then choose an STM32 example from the sample catalog. Start by changing small parts of its values or behavior.

ST’s STM32CubeIDE supports C/C++ development and debugging with a debugger. See connecting a debugger for the AP03 connection setup. An Arduino sketch cannot simply be opened as a CubeIDE project, so start with the environment specified by a Leafony Arduino sample when trying that sample.

Reference: Arduino’s sketch build process

Leaf photo
Search documentation, sample apps, and Q&A