Loading...

CmdMessenger Replaces Messenger

CmdMessenger Library

Description

CmdMessenger is a command-oriented version of Messenger for serial communications. To use CmdMessenger, we define a list of command identifiers, then attach callback / handler functions for received messages. The first sub-string (part) in a message is always the command identifier. If a message is received and there is no corresponding known command (and command handler function) the message is passed to the default message handler.

This new version of the library (version 2.0) contains many changes to both the CmdMessenger class and the example program.

Download

Download the latest version of CmdMessenger from GitHub. Includes example .pde file.

dreamcat4/CmdMessenger

Versions

  • 2.2 2012/03/16: Maintain Compatibility with Arduino IDE
  • 2.1 2011/03/23: Improvement
  • 2.0 2011/03/05: Improvement
  • 0.1 2010/01/12: Initial release

Notes

  • Updated to work with Arduino IDE 022
  • Enable / disable newline (print and ignore)
  • New generic example (works with all Arduinos)
  • More reliable process() loop.
  • User can set their own cmd and field seperator
 (defaults to ';' and ',')
  • Base-64 encoded data to avoid collisions with ^^
  • Works with Arduino Serial Monitor for easy debugging

Requirements

\* Earlier versions of Arduino IDE before 022 might work, but not tested.

Credit

  • Initial Messenger Library - By Thomas Ouellet Fredericks.
  • CmdMessenger Version 1 - By Neil Dudman.
  • CmdMessenger Version 2 - By Dreamcat4.