wiki Complete Documentation - Alteriom/painlessMesh GitHub Wiki
Complete Documentation
Welcome to the complete documentation for Alteriom painlessMesh Library!
📖 Documentation Sections
Getting Started
- Installation Guide - Set up the library in your development environment
- Quick Start - Your first mesh network
- First Mesh Tutorial - Step-by-step guide
API Documentation
- API Reference - Complete class and method documentation
- Core API - painlessMesh core functionality
- Plugin System - Extensible architecture
Examples and Tutorials
- Examples - Working code examples
- Basic Examples - Fundamental usage patterns
- Alteriom Extensions - SensorPackage, CommandPackage, StatusPackage
Architecture
- Mesh Architecture - How the mesh network works
- Plugin System - Extensible package system
Troubleshooting
- FAQ - Frequently asked questions
- Common Issues - Solutions to common problems
Development
- Contributing Guidelines - How to contribute to the project
- Release Guide - Release process documentation
🚀 Quick Links
Installation
# Arduino Library Manager
Tools → Manage Libraries → Search "Alteriom PainlessMesh"
# PlatformIO
lib_deps = alteriom/painlessMesh@^2.0.0
# NPM
npm install @alteriom/painlessmesh
Basic Usage
#include "painlessMesh.h"
#define MESH_PREFIX "YourMeshName"
#define MESH_PASSWORD "YourPassword"
#define MESH_PORT 5555
Scheduler userScheduler;
painlessMesh mesh;
void setup() {
Serial.begin(115200);
mesh.init(MESH_PREFIX, MESH_PASSWORD, &userScheduler, MESH_PORT);
mesh.onReceive([](uint32_t from, String& msg) {
Serial.printf("Received: %s from %u\n", msg.c_str(), from);
});
}
void loop() {
mesh.update();
}
📦 Package Types
SensorPackage (Type 200)
For environmental sensor data collection:
- Temperature, humidity, pressure measurements
- Battery level monitoring
- Timestamp synchronization
CommandPackage (Type 400)
For device control and automation:
- Remote device commands
- Parameter passing via JSON
- Command acknowledgment tracking
StatusPackage (Type 202)
For system health monitoring:
- Device operational status
- Memory usage tracking
- Network connectivity metrics
🌟 Key Features
- Automatic Mesh Formation - Nodes discover and connect automatically
- JSON-Based Messaging - Easy to use and extend
- Time Synchronization - Coordinated behaviors across nodes
- Multi-Platform Support - ESP32, ESP8266
- Alteriom Extensions - Enhanced packages for common use cases
- Comprehensive Testing - Full CI/CD pipeline with automated testing
📚 External Resources
- GitHub Repository: https://github.com/Alteriom/painlessMesh
- NPM Package: https://www.npmjs.com/package/@alteriom/painlessmesh
- PlatformIO Registry: https://registry.platformio.org/libraries/alteriom/painlessMesh
- Issue Tracker: https://github.com/Alteriom/painlessMesh/issues
- Discussions: https://github.com/Alteriom/painlessMesh/discussions
📝 License
This project is licensed under LGPL-3.0 - see the LICENSE file for details.
🤝 Contributing
We welcome contributions! Please see our Contributing Guidelines for details on:
- Code style and standards
- Pull request process
- Issue reporting
- Feature requests
Need Help? Check the FAQ or open an issue.