Skip to content

Commit 00cfedf

Browse files
author
Richard Unger
committed
More docs on communications code
1 parent 4c0031a commit 00cfedf

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

src/comms/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,32 @@
33

44
This folder contains classes to support you communicating between MCUs running SimpleFOC, and other systems.
55

6+
## Telemetry
7+
8+
The [telemetry](telemetry/) subfolder contains classes which can log telemetry information for any of the SimpleFOC registers. Telemetry also supports multiple motors, and multiple telemetry objects can be used at the same time to log different values and at different frequencies.
9+
10+
Since registers are defined for most of SimpleFOC's settings and variables, this goes far beyond the standard monitoring capabilities of the motor class.
11+
12+
A telemetry implementation is provided that uses packet based IO, and is therefore compatible with PacketCommander, and can use either ASCII or Binary protocols (see below).
13+
14+
## PacketCommander
15+
16+
The [streams](streams/) subfolder contains PacketCommander, which allows reading or writing the SimpleFOC registers to control or query the motor. PacketCommander is based on packet IO, and can run in either ASCII or Binary mode.
17+
18+
## I2CCommander
19+
20+
Again based on the registers abstraction, [I2CCommander](i2c/) is a class which enables reading and writing of SimpleFOC registers via I2C bus. When running I2CCommander your MCU is in I2C target mode, and can then be controlled from another MCU or Raspberry Pi.
21+
22+
## Packet IO for Arduino Streams
23+
24+
[Packet based IO](streams/) is implemented for Arduino Stream objects - meaning they can be used with Serial, but potentially also with WiFi or BLE connections supporting the Streams API.
25+
26+
Implementations are available for either ASCII based protocol (TextIO) or binary protocol (BinaryIO).
27+
28+
## Registers abstraction
29+
30+
[SimpleFOCRegisters.h](./SimpleFOCRegisters.h) contains a list of registers known to SimpleFOC. These registers can be read and/or written and code is provided to serialize/deserialize them.
31+
32+
The SimpleFOC packet based IO (PacketCommander, Telemetry), I2CCommander and SettingsStorage as well as our Python API [PySimpleFOC](https://github.com/simplefoc/pysimplefoc) are all based on this register abstraction, and therefore share the same register names/ids.
33+
34+
If implementing your own communications protocol, we encourage you to base it on the Register abstraction if appropriate. This will provide you with ready to use code to access/write the register values, and will make your solution easier to use due to the shared common conventions.

src/comms/streams/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

2-
# PacketCommander & Streams IO
2+
# PacketCommander & Packet IO
33

4+
Our packet based IO classes based on the SimpleFOC registers are a more flexible and powerful way to interact with your SimpleFOC code from the outside.
5+
6+
They are supported by our Python API [PySimpleFOC](https://github.com/simplefoc/pysimplefoc).
47

58
### PacketCommander
69

0 commit comments

Comments
 (0)