Installation
Complete guide to installing MinimalUltrasonic on your system.
Arduino IDE
Method 1: Library Manager (Recommended)
The easiest way to install:
Open Arduino IDE
Navigate to Library Manager
- Click
Sketch→Include Library→Manage Libraries... - Or press
Ctrl+Shift+I(Windows/Linux) /Cmd+Shift+I(Mac)
- Click
Search for Library
- Type "MinimalUltrasonic" in the search box
- Look for "Minimal Ultrasonic by fermeridamagni"
Install
- Click the "Install" button
- Wait for installation to complete
- You'll see "INSTALLED" when done
Verify Installation
- Go to
Sketch→Include Library - You should see "MinimalUltrasonic" in the list
- Go to
Method 2: Manual Installation (ZIP)
For offline installation or specific versions:
Download Library
- Go to GitHub Releases
- Download the latest
.zipfile - Or download master branch
Install ZIP Library
- Open Arduino IDE
- Click
Sketch→Include Library→Add .ZIP Library... - Select the downloaded ZIP file
- Click "Open"
Restart IDE
- Close and reopen Arduino IDE
- The library should now be available
Method 3: Manual Copy
For development or custom installations:
Locate Libraries Folder
- Windows:
Documents\Arduino\libraries\ - Mac:
~/Documents/Arduino/libraries/ - Linux:
~/Arduino/libraries/
- Windows:
Download and Extract
- Download library from GitHub
- Extract the ZIP file
- Rename folder to
MinimalUltrasonic(if needed)
Copy to Libraries Folder
- Copy
MinimalUltrasonicfolder to libraries directory - Folder should contain
src/,examples/, etc.
- Copy
Restart IDE
- Close and reopen Arduino IDE
PlatformIO
Using platformio.ini
Add to your platformio.ini file:
[env:your_board]
platform = atmelavr
board = uno ; or your board
framework = arduino
lib_deps =
fermeridamagni/MinimalUltrasonic@^2.0.0Using PlatformIO Library Manager
- Open PlatformIO Home
- Go to Libraries
- Search for "MinimalUltrasonic"
- Click "Add to Project"
- Select your project
Using CLI
pio lib install "fermeridamagni/MinimalUltrasonic"Verification
After installation, verify it works:
Test Compilation
Create a new sketch:
#include <MinimalUltrasonic.h>
MinimalUltrasonic sensor(12, 13);
void setup() {
Serial.begin(9600);
}
void loop() {
float distance = sensor.read();
Serial.println(distance);
delay(1000);
}Click "Verify" (✓) button. Should compile without errors.
Check Examples
- Go to
File→Examples→MinimalUltrasonic - You should see:
- UltrasonicSimple
- Timeout
- MultipleUltrasonicSensors
- AllUnits
Check Library Version
In your sketch:
#include <MinimalUltrasonic.h>
void setup() {
Serial.begin(9600);
Serial.println("MinimalUltrasonic v2.0.0");
// If this compiles, you have v2.0+
MinimalUltrasonic::Unit unit = MinimalUltrasonic::METERS;
}
void loop() {}Updating
Arduino IDE
Via Library Manager
- Open Library Manager
- Find MinimalUltrasonic
- Click "Update" if available
Manual Update
- Download new version
- Delete old folder from libraries directory
- Install new version
PlatformIO
Update platformio.ini:
lib_deps =
fermeridamagni/MinimalUltrasonic@^2.0.1 ; new versionThen run:
pio lib updateTroubleshooting
Library Not Found
Problem: Arduino can't find the library after installation.
Solution:
- Verify library is in correct folder
- Check folder name is exactly
MinimalUltrasonic - Restart Arduino IDE
- Check File → Preferences → Sketchbook location
Compilation Errors
Problem: MinimalUltrasonic.h: No such file or directory
Solution:
- Reinstall library
- Check include statement:
#include <MinimalUltrasonic.h> - Verify library in Sketch → Include Library menu
Wrong Version
Problem: Old version installed.
Solution:
- Delete old version from libraries folder
- Install new version
- Restart IDE
Permission Errors (Linux/Mac)
Problem: Can't write to libraries folder.
Solution:
# Fix permissions
chmod -R 755 ~/Arduino/libraries/
# Or install with sudo (not recommended)
sudo cp -r MinimalUltrasonic ~/Arduino/libraries/Dependencies
MinimalUltrasonic has zero external dependencies. It only requires:
- Arduino core library (included with Arduino IDE)
- Standard C++ library
No need to install additional libraries!
Platform Compatibility
Tested and working on:
- Arduino Uno
- Arduino Mega
- Arduino Nano
- Arduino Pro Mini
- ESP32
- ESP8266
- Teensy 3.x/4.x
Should work on any Arduino-compatible board with digital pins.
Next Steps
Once installed:
- Getting Started - Wire up your sensor
- Basic Usage - Learn the basics
- Examples - See working code
Quick Test
Load File → Examples → MinimalUltrasonic → UltrasonicSimple to quickly test your setup!