Skip to content

diegofd/terminal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

terminal

Arduino terminal library

How to use:

#include <terminal.h>

Terminal *terminal;

void test_function(short argc, char* argv[]) {
  terminal->write("test_function");

  for(int i = 0; i < argc; i++) {
    terminal->write("argv " + String(i) + " : " + argv[i]);
  }
}

void setup() {
  terminal = new Terminal();

  // Register command
  terminal->register_command("test", &test_function);
}

// Main loop
void loop() {
  // Needed in the loop to read serial line. 
  terminal->read();
  
}

Using this code you can write "test param param" in your serial line and when you push enter the function "test_funcion" will be executed.

About

Arduino terminal library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published