AARUNO

Universal Arduino & ESP Library — One API for All Your Microcontroller Projects

v1.1.1 MIT License Arduino Compatible ESP32 / ESP8266
Download Library View on GitHub

About

AARUNO provides one consistent API for ultrasonic, DHT11/DHT22, LDR, buttons, PIR, LED, buzzer, relay, motor, servo, OLED/LCD, and ESP WiFi across all popular Arduino and ESP boards.

Made by AARUTO

Supported Boards

Arduino Uno R3

ATmega328P · 5V

Uno R4 Minima

RA4M1 · 5V

Uno R4 WiFi

RA4M1 + ESP32-S3

ESP32 Family

Xtensa/RISC-V · 3.3V

ESP8266

NodeMCU / D1 mini · 3.3V

API Reference

ComponentSetupRead/Write
UltrasonicAARUNO.ultrasonic(trig, echo)readUltrasonic() → cm
DHT11/22AARUNO.dht11(pin)readTemperature() / readHumidity()
LDRAARUNO.ldr(pin)readLDR()
ButtonAARUNO.button(pin)buttonPressed()
PIRAARUNO.pir(pin)readPIR()
LEDAARUNO.led(pin)setLED() / setBrightness()
BuzzerAARUNO.buzzer(pin)beep(freq, duration)
RelayAARUNO.relay(pin, activeHigh)setRelay()
Error—lastError() / errorString()

Quick Start

#include <AARUNO.h> void setup() { AARUNO.begin(); AARUNO.ultrasonic(7, 8); AARUNO.lcdI2C(0x27, 16, 2); AARUNO.led(13); AARUNO.buzzer(9); } void loop() { AARUNO.update(); float cm = AARUNO.readUltrasonic(); if (AARUNO.lastError() != AARUNO_OK) return; if (cm > 0 && cm < 20) { AARUNO.setLED(true); AARUNO.beep(2000, 100); AARUNO.displayText("Close!"); } else { AARUNO.setLED(false); } }

Installation

Arduino IDE (.zip)

1. Download repo as .zip or use release AARUNO-1.1.1.zip
2. Sketch → Include Library → Add .ZIP Library
3. Verify: File → Examples → AARUNO → Basic

Arduino CLI

arduino-cli lib install --zip-path AARUNO-1.1.1.zip

Safety

Voltage: ESP32/ESP8266 GPIO is 3.3V, not 5V tolerant. HC-SR04 echo is 5V — use a voltage divider (e.g. 1k/2k) or level shifter.
Current: Never drive motors, relays, servos, or high-current loads directly from GPIO. Use driver modules + external power.