Code Monkey home page Code Monkey logo

simpleserialshell's People

Contributors

brucemack avatar philj404 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simpleserialshell's Issues

Minimum not running in EpoxyDuino

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.

Add ability for comment lines to be ignored

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.

Not Working (UNO R3)

I've uploaded AdjustableBlink on my arduino.
this message appears at first:
image

and then nothing happens when i send "setTogglePeriod" commands

Feature for consideration: optional prompt character(s).

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:

  1. It makes the shell a bit more user-friendly, since it lets the user know when the system is ready to accept input (as opposed to still crunching on the previous command). This pattern is used by the standard UNIX shells.
  2. Makes it easier to write a parser for serial automation of a device that uses the shell. The prompt would serve as a delimiter that indicates that the output of the previous command is finished and that a new command can be sent. This would be helpful for high-level system tests where a device is being controlled via its serial port.

I'll submit a PR for this if the idea is acceptable, but I want to check this first.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.