-
Notifications
You must be signed in to change notification settings - Fork 3
PlatformIOArduinoQuickStart
Note — The recommended way to build a Raft application is with the Raft CLI, which uses ESP IDF directly and gives access to the full Raft build pipeline (SysTypes, file-system images, OTA partitions, WebUI build, etc). The PlatformIO + Arduino path described below is supported as a lightweight option for using parts of
RaftCoreas a library inside an existing PlatformIO project, but does not provide the full SysType/build-process functionality of the IDF-based flow.
Add RaftCore to your platformio.ini lib_deps:
lib_deps =
https://github.com/robdobsn/RaftCoreTo pin to a specific release, append the Git tag:
lib_deps =
https://github.com/robdobsn/RaftCore#v1.44.1The other Raft libraries can be added in the same way:
lib_deps =
https://github.com/robdobsn/RaftCore
https://github.com/robdobsn/RaftSysMods
https://github.com/robdobsn/RaftI2C
https://github.com/robdobsn/RaftWebServerRaft tracks recent ESP IDF releases (currently ESP IDF v5.5.x). When using PlatformIO with the Arduino framework, choose an arduino-esp32 release that is built against an ESP IDF version compatible with the version of Raft you are using. Consult the arduino-esp32 release notes for the corresponding IDF version.
A typical PlatformIO configuration looks like:
[env:esp32s3]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
lib_deps =
https://github.com/robdobsn/RaftCoreIf you need a specific arduino-esp32 (and therefore IDF) version, follow the PlatformIO documentation for overriding the framework.
The full Raft build pipeline (described in Raft Build Process) provides several features that are not available when building under PlatformIO/Arduino:
- SysType resolution and
features.cmakelibrary selection - Automatic merging of JSON config and generation of headers
- WebUI build integration
- Custom partition tables and file-system image generation
- OTA partition layout
For a full Raft application, use Raft CLI and ESP IDF instead. See Quick Start.
- New to Raft? Start with Quick Start.
- Want to use
RaftCorehelper classes (RaftJson,RingBuffer, etc.) inside an existing project? The PlatformIO setup above is sufficient. - Need full SysMod / SysManager / publishing / REST API functionality? Use the IDF-based Raft CLI flow.
Getting Started
- Quick Start
- Architecture at a Glance
- Writing Your First SysMod
- Adding a Comms Channel
- Adding an I2C Device Type
- PlatformIO / Arduino
Scaffolding & Building
- Raft CLI
- SysTypes
- Top-Level SysType
- Build Process
- WebUI Build Pipeline
- File System
- Partitions & Flash
- Local Dev Libraries
- Library Developer Guide
Architecture
Built-in SysMods
- NetworkManager
- BLEManager
- WebServer
- MQTTManager
- SerialConsole
- CommandSerial
- CommandSocket
- CommandFile
- FileManager
- LogManager
- ESPOTAUpdate
- StatePublisher
- Remote Logging
- Data Source Registration
Comms & Protocols
- Stack Overview
- Comms Channels
- ProtocolExchange
- RICREST Protocol
- Real-Time Streams
- Adding REST Endpoints
- Built-in REST Endpoints
- File Download (OKTO)
- OTA Update Flow
Devices & Buses
- DeviceManager
- Device Manager REST API
- Device Factory & Classes
- Device Type Records
- Adding an I2C Device Type
- Device Data Publishing
- Data Logger
- I2C Bus
- I2C Device Scanning
- I2C ID & Polling
- MotorControl Overview
- MotorControl Config
- MotorControl Commands
Helpers
Reference