Skip to content

Status Class extending the Arduino Serial library capabilities

License

Notifications You must be signed in to change notification settings

the-risk-taker/arduino-status-class

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Status Class

Status Class extending the Arduino Serial library capabilities with the following features:

  • adding millis info,
  • print error or warning message,
  • print 8-bits or 16-bits register bit by bit to simplify work with communication protocols,

Library can use I2C Sensor Interface to unify working with I2C devices.

Usage

To see a real-life usage example, open the ADXL345 usage example, or my other projects that utilize that class.

Configuration

Important: in order to use class with different than 115200 baudrate and different Arduino Serial objects in file Status.cpp change the following:

  • to change baudrate:
#define STATUS_CLASS_SERIAL_BAUDRATE 115200UL
  • to change Serial object:
StatusClass Status(Serial, STATUS_CLASS_SERIAL_BAUDRATE, TIME_INTERWAL_IN_MS);

Where in place of Serial you can use {Serial1, Serial2, Serial3, Serial4} in the case of Due board, 'Serial' is set as working default for most Arduino boards.

I2C Sensor Interface usage

In order to use this library with I2C Sensor Interface, you have to in Status.cpp file change the STATUS_IS_USING_SENSOR define to:

#define STATUS_IS_USING_SENSOR 0x01

and include I2C_Sensor.h file to project.

About

Status Class extending the Arduino Serial library capabilities

Topics

Resources

License

Stars

Watchers

Forks

Languages