This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/docs/communication.md

31 lines
899 B
Markdown
Raw Normal View History

2022-04-11 19:16:49 +02:00
# Heliox communication protocol
## Basic data structure
The following table describes the bit pattern for a successful communication with heliox devices.
| 0-15 | 16-22 | 23 | 24-31 | 32-(32+8*x) |
| :---------------: | :----------: | :---------------: | :-------------------: | :---------: |
| Magic Number (HX) | Message Type | Parity Bit (even) | Data Length (x Bytes) | Data |
## Message Types
2022-04-11 21:08:16 +02:00
| Code | Purpose |
| ---- | -------------------- |
| 0 | Light Data |
| 1 | Control Signal |
| 2 | Status Messages |
| 3 | Confirmation Message |
| 4 | Debug Info |
### Light Data
- 1-Byte-block per lamp: 0-255
- Index of lamp determinded by order
### Control Signal
- Index Byte + [ **t** <sub>oggle</sub> | **i** <sub>ncrease</sub> | **d** <sub>decrease</sub> ]
- on
- off