Overview
Kinematrix provides a unified API that works across multiple microcontroller platforms, automatically detecting and optimizing for each platform’s capabilities. Write your code once and deploy it across different hardware with platform-appropriate optimizations.Supported Platforms
ESP32 (Primary Target)
Full feature set with all modules available.ESP32 Specifications
- Processor: Dual-core Xtensa LX6 @ 240MHz
- SRAM: 520KB
- Flash: 4MB typical (up to 16MB)
- Connectivity: WiFi 802.11 b/g/n, Bluetooth 4.2 & BLE
- Peripherals: SPI, I2C, UART, ADC, DAC, PWM, Touch
ESP32 Features
Recommended Use Cases
- IoT applications with cloud connectivity
- Advanced control systems with PID/Fuzzy logic
- Data logging with SD card storage
- Multi-sensor monitoring systems
- Web-based HMI interfaces
ESP8266 (Secondary Target)
WiFi-enabled platform with memory-optimized features.ESP8266 Specifications
- Processor: Xtensa L106 @ 80MHz (160MHz boost)
- SRAM: 80KB user-available
- Flash: 4MB typical
- Connectivity: WiFi 802.11 b/g/n
- Peripherals: SPI, I2C, UART, ADC, PWM
ESP8266 Features
Platform-Specific Optimizations
Recommended Use Cases
- WiFi-enabled sensor nodes
- MQTT-based IoT devices
- Simple web servers
- Basic automation controllers
AVR (Limited Support)
Arduino Uno, Nano, Mega with basic I/O and sensor operations.AVR Specifications
- Processor: ATmega328P @ 16MHz (Uno/Nano), ATmega2560 @ 16MHz (Mega)
- SRAM: 2KB (Uno/Nano), 8KB (Mega)
- Flash: 32KB (Uno/Nano), 256KB (Mega)
- Peripherals: SPI, I2C, UART, ADC, PWM
AVR Features
Memory-Conscious Example
Recommended Use Cases
- Educational projects
- Basic sensor reading
- Simple control loops
- Low-cost prototypes
Platform Detection
Kinematrix automatically detects the platform at compile time:Feature Availability Matrix
| Feature Category | ESP32 | ESP8266 | AVR |
|---|---|---|---|
| WiFi | ✅ Full | ✅ Optimized | ❌ |
| Bluetooth | ✅ | ❌ | ❌ |
| Cloud Services | ✅ Firebase, MQTT | ✅ MQTT, limited Firebase | ❌ |
| SD Card | ✅ | ⚠️ Limited | ✅ Basic |
| EEPROM | ✅ Emulated | ✅ Emulated | ✅ Native |
| FreeRTOS | ✅ | ❌ | ❌ |
| Advanced Sensors | ✅ All | ✅ Most | ⚠️ Basic |
| PID Control | ✅ Advanced | ✅ Advanced | ✅ Basic |
| Fuzzy Logic | ✅ | ✅ | ⚠️ Limited |
| Machine Learning | ✅ | ⚠️ Limited | ❌ |
| Display Systems | ✅ | ✅ | ✅ |
| I2C/SPI | ✅ | ✅ | ✅ |
✅ Full support | ⚠️ Limited/Optimized | ❌ Not available
Module Availability by Platform
WiFi-Only Modules (ESP32/ESP8266)
ESP32-Only Modules
Universal Modules (All Platforms)
Best Practices by Platform
- ESP32
- ESP8266
- AVR
ESP32 Best Practices
Leverage Full Capabilities- Don’t worry about enabling multiple modules
- Use String objects freely
- Enable debugging with
SERIAL_DEBUGGER_V2
Platform-Specific Examples
ESP32: Full-Featured IoT Hub
ESP8266: WiFi Sensor Node
AVR: Basic Sensor Logger
Troubleshooting
ESP8266: Out of memory errors
ESP8266: Out of memory errors
Symptoms: Crashes, resets, heap corruptionSolutions:
- Reduce number of enabled modules
- Use
SERIAL_DEBUGGER_LITEinstead ofSERIAL_DEBUGGER_V2 - Decrease buffer sizes in WiFi/MQTT modules
- Use
F()macro for all string constants - Monitor free heap with
ESP.getFreeHeap()
AVR: Compile errors or crashes
AVR: Compile errors or crashes
Symptoms: Won’t compile or immediate crash on bootSolutions:
- Enable only 1-2 modules at a time
- Use Arduino Mega instead of Uno
- Avoid dynamic memory allocation
- Remove Serial.print() debugging (uses RAM)
- Check RAM usage: Sketch → Verify/Compile → Check output
WiFi modules not available on AVR
WiFi modules not available on AVR
Symptoms: Undefined reference errors for WiFi modulesSolutions:
- WiFi modules only work on ESP32/ESP8266
- Use Ethernet shield for AVR networking
- Or upgrade to ESP8266/ESP32 platform
See Also
- Modular Compilation - Optimize module selection
- Memory Optimization - Detailed memory analysis
- Triple Include System - Advanced architecture