Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lozziboy authored Sep 14, 2023
1 parent 7c317c0 commit 8e6e718
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 0 deletions.
30 changes: 30 additions & 0 deletions examples/Example1/Example1.ino
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();
}
38 changes: 38 additions & 0 deletions examples/Example2/Example2.ino
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();
}

0 comments on commit 8e6e718

Please sign in to comment.