There is no multi-process, nor multi-threading, support on the Arduino. You can do something close to multiple threads with some software though.

You want to look at Protothreads:

Protothreads are extremely lightweight stackless threads designed for severely memory constrained systems, such as small embedded systems or wireless sensor network nodes. Protothreads provide linear code execution for event-driven systems implemented in C. Protothreads can be used with or without an underlying operating system to provide blocking event-handlers. Protothreads provide sequential flow of control without complex state machines or full multi-threading.

Of course, there is an Arduino example here with example code. This SO question might be useful, too.

ArduinoThread is a good one too.

Answer from sachleen on Stack Exchange
🌐
GitHub
github.com › ivanseidel › ArduinoThread
GitHub - ivanseidel/ArduinoThread: ⏳ A simple way to run Threads on Arduino
Blinking an LED is often the very first thing an Arduino user learns. And this demonstrates that periodically performing one single task, like toggling the LED state, is really easy. However, one may quickly discover that managing multiple periodic tasks is not so simple if the tasks have different schedule. The user defines a Thread object for each of those tasks, then lets the library manage their scheduled execution.
Starred by 971 users
Forked by 198 users
Languages   C++
🌐
DigiKey
digikey.com › en › maker › tutorials › 2022 › how-to-write-multi-threaded-arduino-programs
How to Write Multi-Threaded Arduino Programs
May 23, 2022 - While they are not like traditional POSIX threads, Protothreads still have the potential to significantly speed up the development of more complex state-machine-like Arduino programs. For example, the following is a basic Arduino sketch that makes use of Protothreads to blink two LEDs in different intervals:
🌐
GitHub
github.com › arduino-libraries › Arduino_Threads
GitHub - arduino-libraries/Arduino_Threads: Simple thread-safe IO for parallel sketch execution. [BETA] · GitHub
The mechanisms implemented in this library allow any thread to dispatch an I/O request asynchronously and either continue its operation or yield control to the next scheduled thread. All I/O requests are stored in a queue and are executed within a high-priority I/O thread after a context-switch. An example of this can be seen here.
Starred by 49 users
Forked by 3 users
Languages   C++ 98.2% | C 1.8%
🌐
The Robotics Back-End
roboticsbackend.com › home › arduino protothreads [tutorial]
Arduino Protothreads [Tutorial] - The Robotics Back-End
April 26, 2023 - The program will pause the execution of this thread until the condition is true. And that’s where the magic of protothreads is: your global program won’t be stopped here, only this thread will block. Here’s a template you can use to create your protothreads with Arduino.
🌐
Arduino
docs.arduino.cc › libraries › arduinothread
Arduino
October 5, 2018 - The Arduino environment can be extended through the use of libraries. Libraries provide extra functionality for use in sketches. To use a library in a sketch, select it from Sketch > Import Library.
🌐
GitHub
github.com › arduino-libraries › Arduino_Threads › blob › main › docs › threading-basics.md
Arduino_Threads/docs/threading-basics.md at main · arduino-libraries/Arduino_Threads
Threading is a concept that is used on many operating systems to run tasks in parallel. An Arduino example of two such tasks could be to read the position of a potentiometer knob while controlling a servo motor to follow that position.
Author   arduino-libraries
Find elsewhere
🌐
Arduino
projecthub.arduino.cc › adamb314 › how-to-run-57-hard-real-time-threads-on-an-arduino-uno-6ee253
How to Run 57 Hard Real-Time Threads on an Arduino Uno
Project Hub is currently under maintenance · Back to top · © 2026 Arduino · Trademarks & CopyrightsWhistleblowingDigital Services ActTerms of ServicePrivacy PolicySecurityCookie Settings · Report content
🌐
The Robotics Back-End
roboticsbackend.com › home › how to do multitasking with arduino
How To Do Multitasking With Arduino - The Robotics Back-End
April 25, 2023 - Some Arduino pins (not all, pay attention to that) support hardware interrupt. Basically, you create a function which is triggered by a push button or other actuator on a hardware pin. When the interrupt is triggered, the program will be interrupted, and your function will be executed. Once the function has finished, the program continues where it was. Of course, your function should be very fast, so it doesn’t stop the main execution “thread” for too long.
🌐
Arduino
create.arduino.cc › projecthub › reanimationxp › how-to-multithread-an-arduino-protothreading-tutorial-dd2c37
Arduino Project Hub
January 15, 2021 - Arduino Project Hub is a website for sharing tutorials and descriptions of projects made with Arduino boards
🌐
Arduino
docs.arduino.cc › libraries › arduino_threads
Arduino_Threads
March 15, 2026 - The Arduino environment can be extended through the use of libraries. Libraries provide extra functionality for use in sketches. To use a library in a sketch, select it from Sketch > Import Library.
🌐
Espressif
docs.espressif.com › projects › arduino-esp32 › en › latest › openthread › openthread.html
OpenThread - - — Arduino ESP32 latest documentation
All examples are available in the ESP Arduino GitHub repository. ... Simple CLI - Starts the OpenThread CLI console over Serial for interactive command-line testing. View Simple CLI code on GitHub. Stack Shutdown - Runs Thread with auto-start, then tears the stack down with OThread.end() after 30 seconds (documented shutdown order).
🌐
Arduino
arduino.cc › reference › en › libraries › thread
Thread - Arduino Reference
January 15, 2021 - Reference > Libraries > Thread · Other · Simplest kernel for multythreading. Simplest kernel what implement yield() function for iterative time division myltithreading on a smallest AVR8 microcontrollers. Author: Vyacheslav Azarov · Maintainer: Vyacheslav Azarov · Read the documentation · This library is compatible with the avr architecture so you should be able to use it on the following Arduino boards: Arduino Micro ·
🌐
Hackster.io
hackster.io › reanimationxp › how-to-multithread-an-arduino-protothreading-tutorial-dd2c37
How to "Multithread" an Arduino (Protothreading Tutorial) - Hackster.io
January 12, 2022 - If it's time for these threads to fire, .check() will see that and perform their work before continuing the main thread. That's really it in a nutshell, the rest of it you can probably figure out yourself by stepping through the code. Let me end by saying while I may sound like it, I'm NOT a protothreading pro by any means, this is just a simple example I hacked up. If you have any tips or if I was wrong about anything, I encourage feedback and corrections! Thanks :)Read more · Multithreaded LCD Code - multithread.ino (Updated, v1.1) Arduino ·
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Multithreading on Arduino/esp - Programming - Arduino Forum
April 5, 2023 - Hi, I want to know if it's possible to run two or more different program loops concurrently on an arduino? I've implemented an event-based system that deals with several different tasks using specific durations for each event. The system works fine but one issue I have is that certain functions, specifically functions that connect to the wifi and to an mqtt server require the use of delay() while they're waiting for a connection and thus the program blocks in certain areas.
🌐
Arduino
arduino.cc › reference › en › libraries › arduinothread
ArduinoThread - Arduino Reference
January 15, 2021 - A simple way to run Threads on Arduino This Library helps to maintain organized and to facilitate the use of multiple tasks.
🌐
Arduino Forum
forum.arduino.cc › projects › programming
Multithreading with Protothreads, Arduino_Threads - Programming - Arduino Forum
May 21, 2023 - Hello everyone, I'm a little stuck right now, working on a project with an Arduino Nano 33 BLE. Essentially, I'm trying to read 2 characteristics at the same time from the BLE-Server and use that data afterwards to do some stuff.
🌐
Arduino Libraries
arduinolibraries.info › libraries › arduino-thread
ArduinoThread - Arduino Libraries
May 16, 2017 - A simple way to run Threads on Arduino · This Library helps to maintain organized and to facilitate the use of multiple tasks. We can use Timers Interrupts, and make it really powerfull, running "pseudo-background" tasks on the rug
🌐
Hackster.io
hackster.io › adamb314 › how-to-run-57-hard-real-time-threads-on-an-arduino-uno-b8e742
How to Run 57 Hard Real-Time Threads on an Arduino Uno - Hackster.io
July 7, 2022 - The purpose of this project is to show of how light weight the ThreadHandler library is! To get a full guide of all features and how to use it read my previous article on Project Hub: https://create.arduino.cc/projecthub/adamb314/interrupting-thread-handler-3c760b