Fab Academy 2025

@ Fab Lab Rwanda, Kigali

Embedded Programming:

Computer Controlled Cutting


Team Botswana


Demonstrate and compare the toolchains and development workflows for available embedded architectures

Thonny

Thonny is an integrated development environment (IDE) for Python that is designed for beginners. It is simple and easy to use, making it a great choice for those who are new to programming. Thonny is particularly useful for developing programs for microcontrollers that run MicroPython, such as the ESP8266 and ESP32.

  • Supported Architectures: ESP8266, ESP32, Raspberry Pi Pico, etc.
  • Features:
    1. Simple and beginner-friendly interface
    2. Built-in Python debugger
    3. Support for MicroPython
    4. Variable explorer
  • Development Workflow:
    1. Install Thonny IDE
    2. We started off by downloading Thonny program from the website

      Design

      We then installed and launched the Thonny software.

    3. Design
    4. Design
    5. After launching it we configured the interpreter, choosing MicroPython (Raspberry Pi Pico) as the launguage that will be used to run the code. And then we installed MicroPython.

    6. Design
    7. Design
    8. Continuation of installing MicroPython

      This is where I then brought in picture the Raspberry Pi Pico to use, which is shown in the picture below.

    9. Design
    10. I then began with holding the BOOTSEL button on Pi Pico and then plugged the USB cord to get the options/variants to choose from depending on the Pi Pico I am using. After selecting it I then completed the installation.

    11. Design
    12. Design
    13. Write or load a Python script
    14. We then created a code for blinking an LED the run button to execute the script on the microcontroller.

      
      from machine import Pin, ADC
      import time
      
      pot = ADC(Pin(26))
      led = Pin(7, Pin.OUT)
      
      while True:
          pot_value = pot.read_u16()
          if pot_value > 32767:
              led.value(1)  # Turn LED on
          else:
              led.value(0)  # Turn LED off
          time.sleep(0.01)
                                  
    15. Then LED began lighting.
    16. Design
  • Pros:
    1. 👍🏽Beginner-friendly with a simple interface.
    2. 👍🏽Built-in Python debugger for easy debugging.
    3. 👍🏽Support for MicroPython and other Python-based microcontroller platforms.
  • Cons:
    1. 👎🏽Less support for non-Python languages and platforms(not suitable for C/C++ projects).
    2. 👎🏽Limited library and dependency management compared to PlatformIO.
    3. 👎🏽Debugging options are basic.


Arduino IDE

The Arduino Integrated Development Environment (IDE) is a cross-platform application (for Windows, macOS, and Linux) that is written in the programming language Java. It originated from the IDE for the languages Processing and Wiring. It is used to write and upload programs to Arduino compatible boards, but also, with the help of third-party cores, other vendor development boards.

  • Supported Architectures: AVR, ARM, ESP8266, ESP32, etc.
  • Features:
    1. Simple and easy-to-use interface
    2. Extensive library support
    3. Large community and support
    4. Serial monitor for debugging
  • Development Workflow:
    1. Install the Arduino IDE
    2. Arduino IDE was downloaded from website and then launched.

    3. Arduino launch
    4. We then added the blelow URL into the Additional Library Manager.

      http://arduino.esp8266.com/stable/package_esp8266com_index.json

      And then installed the Adafruit Library that support the microcontroller (ESP8266) to use.

    5. ESP8266
    6. Connect the Arduino board to your computer
    7. The micricontroller (WROOM-02) was then connected to the computer.

    8. WROOM02
    9. Select the board and port from the Tools menu
    10. The microcontroller to be used was then selected on the Arduino Ide software by selecting tool on the main menu, then clicking boards, then selecting the board to use which is the esp wroom02.

    11. Arduino launch
    12. Write or load a sketch (program)
    13. We then created a code in the Arduino IDE to test the microcontroller. The code is below:
      
      #include < ESP8266WiFi.h>
      
      const char* ssid = "UNIPOD Staff";
      const char* password = "unipod12345";
      
      const int ledPin = 2;  // GPIO2 is often used for built-in LED
      
      void setup() {
        pinMode(ledPin, OUTPUT);
        Serial.begin(115200);
        delay(10);
      
        Serial.println();
        Serial.print("Connecting to ");
        Serial.println(ssid);
      
        WiFi.begin(ssid, password);
        while (WiFi.status() != WL_CONNECTED) {
          delay(500);
          Serial.print(".");
        }
      
        Serial.println("");
        Serial.println("Wi-Fi connected.");
        Serial.print("IP Address: ");
        Serial.println(WiFi.localIP());
      }
      
      void loop() {
        digitalWrite(ledPin, HIGH);
        delay(500);
        digitalWrite(ledPin, LOW);
        delay(500);
      }
                                                  
    14. Click the upload button to compile and upload the code to the board
    15. The code was then uploaded and the connection status was printed in the serial monitor.

    16. wifi connection
  • Pros:
    1. 👍🏽Beginner-friendly with a simple interface.
    2. 👍🏽Large community support with many example codes.
    3. 👍🏽Plug-and-play approach for rapid prototyping.
  • Cons:
    1. 👎🏽Limited debugging capabilities (no native breakpoints or real-time debugging).
    2. 👎🏽Library and dependency management is less flexible than PlatformIO.

PlatformIO

PlatformIO is a professional collaborative platform for embedded development that includes support for multiple IDEs, including VSCode, Atom, and CLion. It supports over 800 different boards and provides a unified interface for development, debugging, and testing.

  • Supported Architectures: AVR, ARM, ESP8266, ESP32, STM32, etc.
  • Features:
    • Multi-platform and multi-architecture support
    • Integrated debugging
    • Library management
    • Continuous integration support
  • Development Workflow:
    1. Install PlatformIO IDE or the PlatformIO extension for your preferred IDE
    2. Create a new project and select the board and framework
    3. Write or load your code
    4. Build the project to compile the code
    5. Upload the code to the microcontroller
    6. Use the integrated debugger for debugging
  • Pros:
    1. 👍🏽Support for a wide range of boards and architectures.
    2. 👍🏽Integrated debugging for real-time debugging.
    3. 👍🏽Advanced debugging tools (breakpoints, serial monitoring).
    4. 👍🏽Library management for easy dependency management.
  • Cons:
    1. 👎🏽More complex setup than Arduino IDE.
    2. 👎🏽Steep learning curve for beginners.
    3. 👎🏽Requires installation of additional software and dependencies.
    4. 👎🏽Requires familiarity with VS Code and PlatformIO configurations.

Instructor

Contacts

  • Map
  • +250 781 187 555