Skip to content

A Wiring/Arduino library to tokenize and parse commands received over a serial port.

License

Notifications You must be signed in to change notification settings

shyd/Arduino-SerialCommand

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SerialCommand

A Wiring/Arduino library to tokenize and parse commands received over a serial port.

additional usage for using custom serial object.

Usage

  • With default (Serial)
#include <SerialCommand.h>
SerialCommand parser;
  • With Custom Serial
#include <SerialCommand.h>
SerialCommand parser(Serial2);
  • With Custom Serial, and custom debug
#include <SerialCommand.h>
#define SERIALCOMMAND_DEBUG
SerialCommand parser(Serial2, Serial3);
  • With Custom Serial and terminator
#include <SerialCommand.h>
SerialCommand parser(Serial2, '\r');

PlatformIO

With PlatformIO those defines can be set in the platformio.ini:

build_flags =
	-DSERIALCOMMAND_DEBUG
	-DSERIALCOMMAND_BUFFER=64
	-DSERIALCOMMAND_MAXCOMMANDLENGTH=16

History

This version advances the extended version by Mingyu Kim.

The original version of this library was written by Steven Cogswell (published May 23, 2011 in his blog post "A Minimal Arduino Library for Processing Serial Commands").

This is a heavily modified version with smaller footprint and a cleaned up code by Stefan Rado.

About

A Wiring/Arduino library to tokenize and parse commands received over a serial port.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 100.0%