Arduino-SerialCommand | Arduino library to tokenize and parse commands

 by   kroimon C++ Version: Current License: No License

kandi X-RAY | Arduino-SerialCommand Summary

kandi X-RAY | Arduino-SerialCommand Summary

Arduino-SerialCommand is a C++ library typically used in Internet of Things (IoT), Arduino applications. Arduino-SerialCommand has no bugs, it has no vulnerabilities and it has low support. You can download it from GitHub.

The original version of this library was written by [Steven Cogswell] (published May 23, 2011 in his blog post ["A Minimal Arduino Library for Processing Serial Commands"] This is a heavily modified version with smaller footprint and a cleaned up code by Stefan Rado.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Arduino-SerialCommand has a low active ecosystem.
              It has 298 star(s) with 126 fork(s). There are 44 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 10 open issues and 2 have been closed. There are 5 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Arduino-SerialCommand is current.

            kandi-Quality Quality

              Arduino-SerialCommand has 0 bugs and 0 code smells.

            kandi-Security Security

              Arduino-SerialCommand has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              Arduino-SerialCommand code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              Arduino-SerialCommand does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              Arduino-SerialCommand releases are not available. You will need to build from source code and install.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Arduino-SerialCommand
            Get all kandi verified functions for this library.

            Arduino-SerialCommand Key Features

            No Key Features are available at this moment for Arduino-SerialCommand.

            Arduino-SerialCommand Examples and Code Snippets

            No Code Snippets are available at this moment for Arduino-SerialCommand.

            Community Discussions

            Trending Discussions on Arduino-SerialCommand

            QUESTION

            Reading serial commands takes too much time
            Asked 2018-Jul-13 at 11:29

            so following problem: I am currently writing a small program for my NUCLEO F207ZG which provides an interface for other services over the serial port. The goal of my program is to expose data with commands like ?variable and set values with !variable (eg. ?threshold returns 1400 and !threshold 1234 sets threshold to 1234). Additonally the variables in my program are synced with the EEPROM to persist the data.

            For this whole process I've been given a codebase which includes a SerialCommands.h library.

            Problem

            The main problem is that setting values takes up way too much time and breaks the serial buffer (or something similiar) if other commands are executed immediatly after setting. I've written a few unit tests in python (using pyserial) that execute get requests (such as ?threshold) flawlessy, as often as possible. However, If I execute a set command (such as !threshold 1400) I need to wait AT LEAST four seconds before making any other requests, otherwise the serial interface/buffer seems to lose some data. The same thing happens if I try to make any set -> get requests on the Arduino Serial Monitor. Here is a short example:

            1. ?threshold => returns '1400'
            2. !threshold 1234
            3. ?threshold => nothing happens
            4. ?threshold => nothing happens
            5. ?threshold => returns 'unrecognized command ???threshold' (see my code for this functionality)

            EDIT: Something important which I forgot to mention. After the program has recovered (after step 5) the value can be queried correctly.

            1. ?threshold => returns '1234'

            I also have a blinking status LED (in 500ms steps) and if I set something the blinking stops noticeably for around a second.

            Code

            So here is (non-working) simplified example of my codebase:

            ...

            ANSWER

            Answered 2018-Jul-12 at 10:26

            It sounds like it could be caused by your Python program. Did you remember to add a null-terminator (\0) after the 1234 integer? Serial commands generally require strings, which must end with a null-terminator. If not your Arduino might keep on waiting for the terminator, and only stops when a timeout occurs or watchdog causes a reset (which could be 4 seconds). That would explain the hold-up.

            Source https://stackoverflow.com/questions/51302313

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install Arduino-SerialCommand

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/kroimon/Arduino-SerialCommand.git

          • CLI

            gh repo clone kroimon/Arduino-SerialCommand

          • sshUrl

            git@github.com:kroimon/Arduino-SerialCommand.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link