MIT License

项目介绍

PowerBroker2/SerialTransfer 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 MIT License 许可证,目前获得 488 个 Star、72 次 Fork。

仓库全名
PowerBroker2/SerialTransfer
开源许可证
MIT License
Star 数
488
Fork 数
72

README 摘要

SerialTransfer SerialTransfer is an easy to use Arduino library for transferring packetized data fast and reliably via Serial, I2C, and SPI interfaces. Interconnect your Arduinos today minus the headache with SerialTransfer! A mirror library is also available for Python! This library: can be downloaded via the Arduino IDE's Libraries Manager (search "SerialTransfer.h") works with "software-serial", "software-I2C",…

完整内容见 GitHub 原始 README 或本页 。

常见问题

SerialTransfer 用什么语言开发?

主要使用 C++ 编写,采用 MIT License 许可证,目前有 488 个 Star。

SerialTransfer 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 SerialTransfer 的源码?

可以直接克隆仓库:git clone https://github.com/PowerBroker2/SerialTransfer.git,默认分支为 master;安装与运行步骤见仓库 README。

SerialTransfer 最近还在维护吗?

仓库最近一次更新为 1 天前,当前没有未关闭的 Issue;Star 数为 488,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Arduino library to transfer dynamic, packetized data fast and reliably via Serial, I2C, etc.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

C++

Release

README

SerialTransfer

GitHub version arduino-library-badge

SerialTransfer is an easy to use Arduino library for transferring packetized data fast and reliably via Serial, I2C, and SPI interfaces. Interconnect your Arduinos today minus the headache with SerialTransfer!

A mirror library is also available for Python!

This library:

  • can be downloaded via the Arduino IDE’s Libraries Manager (search “SerialTransfer.h”)
  • works with “software-serial”, “software-I2C”, and “software-SPI” libraries
  • is non blocking
  • uses a start byte and payload length for packet framing
  • uses CRC-8 (Polynomial 0x9B with a lookup table) over the packet ID, length, and payload
  • allows dynamically sized packets with payloads from 0 to 255 bytes
  • supports user-specified callback functions
  • can transfer bytes, ints, floats, structs, even large files like JPEGs and CSVs!!

Packet Anatomy:

START | ID | LENGTH | PAYLOAD (0..255 bytes) | CRC-8(ID, LENGTH, PAYLOAD)

I2C frames are split into consecutive transactions of up to 32 bytes by default so the maximum-size packet fits common Wire buffers. The receiver reassembles those chunks in the packet parser. Call I2CTransfer::available() or I2CTransfer::tick() regularly from loop(); configured packet callbacks are dispatched there, outside the Wire receive interrupt. The receiver has one packet buffer, so consume each packet before the sender sends another. Define SERIALTRANSFER_I2C_CHUNK_SIZE before including I2CTransfer.h to match a different Wire buffer capacity.

How To Use:

See the curated example guide for Serial and I²C quickstarts, loopback analysis, callbacks, and multi-packet file transfer. Older sketches are retained in examples/Legacy/.

  • datum = tx/rx a single object
  • data = tx/rx multiple objects

For object helpers, the library copies raw in-memory bytes. Structure padding, endianness, and floating-point formats are not converted; use matching layouts or serialize multi-byte fields explicitly when communicating across different architectures.

NOTE:

SPITransfer.h and it’s associated features are not supported for the Arduino Nano 33 BLE or DUE and other boards. This header file is disabled by default, but can be enabled by commenting out #define DISABLE_SPI_SERIALTRANSFER 1 within SerialTransfer.h.

评论

暂无评论