Device Interface

SPAD.neXt device interface V2

SPAD.neXt can communicate with external devices like e.g. Arduino/Teensy via a very simple line based communication.

Request and reply on both sides will follow this format:

<ChannelId>,<Param1>[,...,<ParamN>];

circle-check

triangle-exclamation
circle-info

For a SPAD.neXt compatible Arduino library import CmdMessenger (4.0) into the Arduino IDE (recommended) or clone the github repository at https://github.com/thijse/Arduino-CmdMessengerarrow-up-right

There is also a customized version available at the SPAD.neXt GitHub (TODO LINK) which includes SPAD.neXt specific functions to make device programming more easy.

circle-info

The same protocol can be used to communicate with SPAD.neXt e.g. via a Websocket (TODO WEBSOCKET) and procide e.g. a custom webinterfaced device

Channel-ID's

ChannelID
Purpose
Direction

0

General Commands

SPAD <--> Device

1

Data Commands

Device -> SPAD

2

SPAD.neXt Events

SPAD -> Device

3

Debug

Device -> SPAD

4

Simulation Event

Device -> SPAD

5

Data Channel

SPAD -> Device

6

Device LED updates

SPAD -> Device

7

Device Display updates

SPAD -> Device

8

Device Input

Device -> SPAD

9

(reserved for future use)

10 .. 49

Dedicated Data Channels

SPAD <-> Device

circle-info

By default cmdMessenger is limited to a max of 50 channels to preserve device memory. You can change that by altering the line #define MAXCALLBACKS 50 in cmdMessenger.h, however this is not recommended.

circle-exclamation
triangle-exclamation

Last updated

Was this helpful?