wiki Complete Documentation - Alteriom/painlessMesh GitHub Wiki

Complete Documentation

Welcome to the complete documentation for Alteriom painlessMesh Library!

📖 Documentation Sections

Getting Started

API Documentation

Examples and Tutorials

Architecture

Troubleshooting

Development

🚀 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

📝 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.