-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
/* | ||
a fast lightweight real time library to monitor and modify arduino variables via serial usb | ||
this library is compatible with arduino unoR3, unoR4, Mega, and shields based on esp8266, esp32 | ||
https://github.com/lozziboy/arduino-serial-variable-table | ||
*/ | ||
|
||
// include cSerialWatcher class | ||
#include "cSerialWatcher.h" | ||
|
||
// create SerialWatcher instance | ||
cSerialWatcher SerialWatcher(Serial); | ||
|
||
// create global variables | ||
int u = 15; | ||
bool v = true; | ||
|
||
void setup() { | ||
Serial.begin(115200); // init serial communication | ||
} | ||
|
||
void loop() { | ||
|
||
// map variables | ||
SerialWatcher.Map(F("u"), u); | ||
SerialWatcher.Map(F("v"), v); | ||
|
||
// update watch stream | ||
SerialWatcher.Update(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
/* | ||
a fast lightweight real time library to monitor and modify arduino variables via serial usb | ||
this library is compatible with arduino unoR3, unoR4, Mega, and shields based on esp8266, esp32 | ||
https://github.com/lozziboy/arduino-serial-variable-table | ||
*/ | ||
|
||
// include cSerialWatcher class | ||
#include "cSerialWatcher.h" | ||
|
||
// create SerialWatcher instance | ||
cSerialWatcher SerialWatcher(Serial); | ||
|
||
// create global variables | ||
char w[25] = "my array char"; | ||
int u = 15; | ||
int v = 26; | ||
float f = 13.6; | ||
float g = 9.1; | ||
byte b = 12; | ||
|
||
void setup() { | ||
Serial.begin(115200); // init serial communication | ||
} | ||
|
||
void loop() { | ||
|
||
// map variables | ||
SerialWatcher.Map(F("w"), w); | ||
SerialWatcher.Map(F("u"), u); | ||
SerialWatcher.Map(F("v"), v); | ||
SerialWatcher.Map(F("f"), f); | ||
SerialWatcher.Map(F("g"), g); | ||
SerialWatcher.Map(F("b"), b); | ||
|
||
// update watch stream | ||
SerialWatcher.Update(); | ||
} |