Electronics - STM32 - Setting up PlatformIO in ROS2 DevContainers

This guide provides a step-by-step workflow to bridge physical STM32 hardware into a virtualized ROS2 DevContainer. It leverages PlatformIO and usbipd to enable firmware flashing from a Docker environment. First of all Github project for this tutorial: https://github.com/badprog/badprog-electronics-stm32-setting-up-platformio-in-ros2-devcontainers Shopping list: An electronic board like the STM32F3Discovery board (STM32F303VCT6 microcontroller) Windows 10 or 11 WSL 2 (Windows Subsytem for Linux) Ubuntu 24.04 usbipd-win:https://github.com/dorssel/usbipd-win/releases A Dockerfile withROS 2 image (osrf/ros:jazzy-desktop) VSCode with extensions: Dev Containers (ms-vscode-remote.remote-containers) Robot Developer Extensions for ROS 2 (Ranch-Hand-Robotics.rde-ros-2) PlatformIO IDE (platformio.platformio-ide) WSL: Windows Subsystem for Linux In order to get WSL, simply open a PowerShell terminal in Admin mode: ...

March 9, 2026 · Mi-K

Electronics - STM32 - GPIO overview with the STM32F3-Discovery board

GPIO is one of the most easy peripheral to understand in a microcontroller. But of course it demands a bit of practice to handle it with ease. That’s the purpose of this STM32F303-Discovery board tutorial. We are going to blink 4 LEDS in order to get how the basics work. GitHub Retrieve this example with full code on my GitHub: https://github.com/badprog/badprog-stm32f303vct6-blinking-led Registers In the STM32F303VCT6, there are of course some GPIOs. ...

April 11, 2016 · Mi-K

Electronics - STM32 - Using the push button to switch on the LED6 on the STM32F3-Discovery board

This tutorial may be seen as a HelloWorld project. Indeed we are going to switch on the LED6 of the STM32F3-Discovery board with the push button. The code has been reduced to its minimum in order to get the most important elements in this example. First of all You can find the whole project on my GitHub: https://github.com/badprog/badprog-stm32f303vct6-pushbutton-led The project has been made with Atollic TrueStudio, but the code in the main.c file is the same, if you use another IDE such as Keil uVision, IAR EW and so on. ...

March 24, 2016 · Mi-K

Electronics - Atollic - Code completion and content assist

As Atollic is based on the Eclipse IDE, this tutorial is so also available for Eclipse. We are going to see how to add the completion to the Atollic TrueStudio IDE. Of course, this turorial admits that you have a project where the code completion is missing because you don’t have the correct libraries. If you have set correctly your project, and still have a completion problem, then I suggest to close and reopen it, it could solve this issue. ...

March 22, 2016 · Mi-K

Electronics - MSP430 - Using timer and interruption to generate a delay of 1 second

The first two features to understand in a microcontroller are timers and interruptions. Indeed, without a timer nor interruptions, it’s quite impossible to have an accurate timing in a program. Let’s see that in this tutorial and let’s generate a timing of 1 second with the G2553 microcontroller. First of all The essential documents needed for any project with a MSP430 microcontroller are: datasheet –> http://www.ti.com/lit/ds/symlink/msp430g2553.pdf user guide –> http://www.ti.com/lit/ug/slau144j/slau144j.pdf The main goal of a timer is to generate a counter and check if a particular number in this counter has been reached. ...

January 4, 2016 · Mi-K

Electronics - STM32 - Setting up the Nucleo board with IAR

The Nucleo wants to be a concurrent of Arduino. You had probably tested the mbed.org compiler. But you would like to program a firmware without any online IDE (that comes with some advantages and drawbacks). In this tutorial, we’ll use the IAR Embedded Workbench for ARM, well known as EWARM, in order to program the STM32 microcontroller (in our case the STM32-L053R8). So let’s get started. IAR installation IDE First of all we need to download the new IAR ARM version (7.30.1) because older versions are missing some functionalities to use projects provided by STMicroelectronics. ...

November 15, 2014 · Mi-K

Electronics - Verilog - Turning off 7-segment displays

A quick code to turn off every single segment onto a FPGA board. For this tutorial we use the Altera DE1 board. So if you have another one, just replace HEX0, HEX1, HEX2, HEX3 by your assignment. Explanation Each number is a pin onto the board. As there are 4 * 7 segments = 28 segments to light, so 28 pins. So, to turn off all segments of a display, it’s necessary to use 7’b1111111 as value. ...

April 22, 2014 · Mi-K

Electronics - Verilog - Blinking a LED with GPIOs

As you certainly liked this Altera DE1 tutorial for blinking a LED on the board , you will love this one by doing the same easy thing but with GPIOs. I’m sure you are really excited about that. So let’s go. Explanation On the DE1 board, there are many GPIOs. What is a GPIO? –> GPIO stands for General Purpose Input Output. It’s a group of pins that you can set to input or output individually. ...

April 19, 2014 · Mi-K

Electronics - Quartus II - Creating your first SoPC with Qsys and Nios II software

Qsys is the new Altera SOPC Builder tool. So if you are using Quartus 13.0.x, you should have it. Then, don’t be surprised not having, for example, the simple SOPC Builder tool in your Quartus version. It’s just normal because Qsys is the new name of the SOPC Builder and its improvement. That said, let’s get started with this tutorial and let’s create your first System on Programmable Chip (SoPC) or System on Chip (SoC) with Qsys. ...

April 6, 2014 · Mi-K

Electronics - Verilog - Instantiating a module from another module

You understood the structural description in Verilog . You are currently using the Altera DE1 board. Fine. But you want more because you really want to understand how it works through a real example with your board. And not a difficult one of course, a beginner tutorial with an easy example of instantiating a module from another module. Let’s get started. Explanation We are going to create two files: an abstract and an object. ...

March 29, 2014 · Mi-K