Giter Site home page Giter Site logo

ansi's Introduction

Arduino CI Arduino-lint JSON check License: MIT GitHub release

ANSI

Arduino library with basic ANSI display codes for terminal applications.

Description

ANSI codes are special codes that are send to a terminal e.g. VT100 to add attributes to displayed characters. Typical examples are bold, blink or colour. Also known as escape codes the set of codes is large, however not all terminal types do support all codes.

Sending these ANSI codes to a simple ASCII only terminal like the one in the Arduino IDE might result in garbage. So use with care.

Terminals tested

Tests are done with

  • TeraTerm 4.102 + 4.106 (VT100, VT202, VT525 mode)
  • Putty 0.71

Other terminal program's exist so please let me know if yours is working too. If not, please open an issue.

Operation

See examples

Performance

Since 0.1.5 there is some focus on performance. Using ansi.print() and ansi.println() for printing text and numbers is improved a bit since 0.1.4 by adding the private write(array, length).

Experimental 0.1.6

Version 0.1.6 added a number of experimental function that need more testing. Some are working, others are unclear, but the user can uncomment these and experiment with them if needed.

Also added is the int deviceType() function which also need more testing

As always, constructive feedback is welcome.

Future

  • test more terminal programs (Linux mac)
  • write more examples
    • DOS emulator?
  • increase functionality
    • which codes are useful ?
  • investigate performance. (first step made in 0.1.5 but more possible)
    • add line buffer in write(c) to improve throughput?
    • need for flush() with line buffer?
    • rewrite functions, replace print() by _stream->write() calls? (effect on size?)

ansi's People

Contributors

robtillaart avatar innermatrix avatar

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.