philj404 / simpleserialshell Goto Github PK
View Code? Open in Web Editor NEWAn extensible command shell for Arduino.
License: MIT License
An extensible command shell for Arduino.
License: MIT License
For example, if commands "setroute" and "setrouteremote" are both registered (with documentation) the wrong function will be executed under certain circumstances. This defect was introduced by @brucemack during the work on the help feature. Fix will follow.
Hello, nice shell library!
I have a problem. When I try to run an minimum example on EpoxyDuino. I do not see anything on the screen.
#include <Arduino.h>
#include <SimpleSerialShell.h>
#if defined(UNIX_HOST_DUINO)
# ifndef ARDUINO
# define ARDUINO 100
# endif
#endif
int helloWorld(int argc, char **argv) {
int a = argc;
int b = (int)(long)argv;
Serial.println("hello world");
return a+b;
};
void setup(){
::delay(1000); // wait for stability on some boards to prevent garbage Serial
Serial.begin(115200); // ESP8266 default of 74880 not supported on Linux
while (!Serial); // for the Arduino Leonardo/Micro only
shell.attach(Serial);
shell.addCommand(F("sayHello"),helloWorld);
}
void loop(){
shell.executeIfInput();
}
I can insert keys and delete them with keyboard, but If I press Enter, nothing happens.
Thanks for making such a great library. Incredibly useful. Especially because you have both Serial attachment and a more manual shell.execute(line);
features.
There's only one feature that I think would be really useful, and that's the ability to register a comment character like "#", that means a line is skipped over immediately without a command not found message being outputted.
Would it be reasonable to add the ability to define a prompt string that would be displayed whenever the shell was waiting for user input? I would typically install something like "> " or "$ ".
Why? Two reasons:
I'll submit a PR for this if the idea is acceptable, but I want to check this first.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.