This is a set of two libraries to view Arduino data. They rely on JsonSerialStream to output data through USB.
- Dependent on JsonSerialStream as a sibling library
| JsonSerialStream
+ JsonSerialStream.h
| ArduinoMonitor
+ Logger.h
+ SensorMonitor.h
Into a git repository
- Create a
srcfolder in your sketch's directory. - In terminal, navigate to the
srcdirectory. - Run the command
git submodule add https://github.com/MSUSeconRobotics/ArduinoMonitor.git - In your sketch, add
#include "src/ArduinoMonitor/Logger.h"and add#include "src/ArduinoMonitor/SensorMonitor.h"
This results in a structure that looks like this:
- ExampleSketch
- ExampleSketch.ino
- src
- JsonSerialStream
- JsonSerialStream.h
- JsonSerialStream.cpp
- JsonSerialStream
Please note that to clone your git repo now, you must either:
-
Run
git clone --recurse-submodules <RepoURL>or
- Run
git clone <RepoURL> - Run
git submodule init - Run
git submodule update
Details can be found here: https://git-scm.com/book/en/v2/Git-Tools-Submodules
Outside a git repository
The recommended way of including this library into your sketch is to:
- Creating a
srcfolder in your sketch's directory - Cloning this repository into that
srcfolder. - In your sketch, add
#include "src/ArduinoMonitor/Logger.h"and add#include "src/ArduinoMonitor/SensorMonitor.h"
This results in a structure that looks like this:
- ExampleSketch
- ExampleSketch.ino
- src
- JsonSerialStream
- JsonSerialStream.h
- JsonSerialStream.cpp
- JsonSerialStream
You may also clone this repository into your Arduino libaries directory. Or you can extract the .h and .cpp and put them into your sketch directory.
These are not advised as they can get cluttered, are hard to update, or may result in "works on my machine" as a result of different installed libraires.