First Test env

This commit is contained in:
Emanuele Trabattoni
2026-03-27 12:49:20 +01:00
parent a0710f7ee7
commit a210d808da
8 changed files with 292 additions and 86 deletions

17
RotaxMonitor/src/utils.h Normal file
View File

@@ -0,0 +1,17 @@
#pragma once
#include <Arduino.h>
#include <string>
std::string printBits(uint32_t value) {
std::string result;
for (int i = 31; i >= 0; i--) {
// ottieni il singolo bit
result += ((value >> i) & 1) ? '1' : '0';
// aggiungi uno spazio ogni 8 bit, tranne dopo l'ultimo
if (i % 8 == 0 && i != 0) {
result += ' ';
}
}
return result;
}