The DOOM of Async Frameworks: Write Once, Compile Everywhere, Process Everything.
Nodepp-Arduino is a lightweight, 100% asynchronous framework designed to bring the power of event-driven programming to microcontrollers. It eliminates the limitations of blocking code (like delay()), allowing your Arduino to handle massive concurrency—from sensor polling to complex encryption—without skipping a beat.
By combining an internal Event Loop with EE-optimized memory primitives, Nodepp enables a Write Once, Compile Everywhere workflow. Your logic stays consistent whether you're targeting an 8-bit Nano, a dual-core ESP32, or a high-end cloud server.
To showcase Nodepp for Arduino efficiency on bare metal hardware, we implemented a fully functional Enigma Machine on an Arduino Nano.
ezgif-7f4dec232396a556.mp4
Try it now: Enigma Machine Simulation
-
Zero-Blocking Architecture: Never use
delay()again. Every task runs asynchronously, keeping your MCU responsive. -
EE-Optimized Memory: Custom
ptr_tandstring_tuse Small Stack Optimization (SSO) and zero-copy slicing to prevent heap fragmentation on low-RAM chips. -
Universal Logic: Write your application logic once and deploy it across Linux, Windows, Mac, Android, WASM, and ESP32/Arduino.
-
Batteries Included: Built-in engines for JSON parsing, RegExp, UTF manipulation, and Promises—all optimized for embedded constraints.
Stop managing complex state machines. Use coDelay to pause a task without freezing the whole system.
#include <nodepp.h>
using namespace nodepp;
void onMain() {
ptr_t<uchar> LEDs ({ 2, 3, 4, 5 }); // SSO Optimized
for( auto x: LEDs ){ pinMode( x, OUTPUT ); }
process::add( coroutine::add( COROUTINE(){
static uchar i = 0;
coBegin
while( true ){
digitalWrite( LEDs[i], LOW );
i = ( i + 1 ) % LEDs.size();
digitalWrite( LEDs[i], HIGH );
coDelay( 300 ); // Non-blocking delay
}
coFinish
}));
}Trigger actions based on system signals or custom events seamlessly.
#include <nodepp.h>
#include <nodepp/event.h>
using namespace nodepp;
event_t<> ev;
void onMain(){
pinMode( 13, OUTPUT );
ev.on([](){
static bool state=0; state=!state;
digitalWrite( 13, state );
});
ev.emit(); // Manually trigger or bind to interrupts
}Handle long-running tasks or sensor readings using a modern Promise style API.
#include <nodepp.h>
#include <nodepp/promise.h>
using namespace nodepp;
void onMain(){ Serial.begin( 9600 );
promise_t<int,except_t>([=]( res_t<int> res, rej_t<except_t> rej ){
res( 10 );
})
.then([=]( int res ){ console::log( res ); })
.fail([=]( except_t err ){ console::log( err.what() ); })
}Nodepp is the only framework that lets you share logic between the deepest embedded layers and the highest web layers.
- Hardware: NodePP for Arduino
- Desktop: Nodepp for Desktop
- Browser: Nodepp for WASM
Nodepp is an open-source project that values Mechanical Sympathy and Technical Excellence.
- Sponsorship: Support the project via Ko-fi.
- Bug Reports: Open an issue via GitHub.
- License: MIT.
Nodepp is distributed under the MIT License. See the LICENSE file for more details.