Skip to content

NullSerial is an Arduino Library, "Serial" like but not print anything.

License

Notifications You must be signed in to change notification settings

iitaka1142/NullSerial

Repository files navigation

NullSerial

Serial like library which throwing away input/outupt.

Usage

Include

#include <NullSerial.h>

A header file will be included automatically when you use "include the library" in Arduino IDE.

Instance

A instance NullSerial is defined in the library.

Initialize

NullSerial does not need to initialize(call .begin() member function). You can call it, too. begin() does not do anything.

Example

#define DEBUG
#define VERBOSE

#if defined(DEBUG)
# define SerialDebug   Serial
# deinfe SerialVerbose Serial
#elif defined(VERBOSE)
# include <NullSerial.h>
# define SerialDebug   NullSerial
# define SerialVerbose Serial
#else
# include <NullSerial.h>
# define SerialDebug   NullSerial
# define SerialVerbose NullSerial
#endif

// your sketch starts below
// ...

License

LGPLv3

References

ToDo

  • Test using NullSerial instead of SerialUSB

About

NullSerial is an Arduino Library, "Serial" like but not print anything.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages