Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * SerialIndex, send int example A
- * In this example variable var1 is added to SerialIndex and
- * is monitored for changes over time. the value of var1 is
- * continuously increasing and you will see the current state
- * inside the Serial Monitor when active.
- * To make changes to var1, use the Serial Monitor's send option
- * and type (make sure the line ending is set to 'Both NL & CR'):
- * var1=0
- * this will reset the value of var1 to 0.
- */
- #include <SerialIndex.h>
- int var1 = 500;
- void setup() {
- Index.begin(9600);
- Index.read(true);
- Index.add("var1", var1);
- }
- void loop() {
- var1++;
- // update SerialIndex
- Index.update();
- // add some delay-time
- delay(100);
- Serial.println(var1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement