Using NMEA formatted messages, commands can be sent to the μModule to perform actions. After the commands are executed, a response is returned.
NMEA messages are formatted as follows:
- Each message starts with $
- Types are 3 to 5 characters and specify an action to perform
- Arguments are separated by commas and can be of any type, string, float, etc.
- Messages end with a * and are followed with a CRC value represented by two hexadecimal characters. CRC checks are turned off by default, but two characters still must be passed. Two zeros works for this.
Some example messages to request a conductivity measurement from a μMod-EC device would look like this:
A complete listing of types and their parameters can be found in each μModule's respective documentation.
By default, the response to an NMEA message is an NMEA-formatted response. It will be identified using the same type, UFEC for example, but in place of the arguments used to call it, response information will be sent.
An example UFEC response:
Represents a conductivity measurement (UFEC) that measured 1100 microsiemens, or 1.1 millisiemens, and finished with an error code of 0 (no error).
Note the CRC of response messages is always valid, regardless of CRC checks being on or off.