Giter Site home page Giter Site logo

serial_monitor's Introduction

Sublime Text 3 Serial Monitor

This plugin is an alternative to common serial/UART terminals like TeraTerm, Putty, miniterm, and the like

This plugin is built upon pyserial

Installing

In sublime, go to Preferences -> Browse packages. It will open a window of the packages location on your filesystem

To install via git, clone the repository into this directory. For Windows, the directory will look someting like C:\Users\${user}\AppData\Roaming\Sublime Text 3\Packages

To install without git, download the serial_monitor.sublime-package file from the Releases page. Navigate up one directory from the location taken in the Browse Packages, then navigate into the folder Installed Packages Copy the .sublime-package file into this location

Restart Sublime

Commands

Commands are accessed through Menu->Tools->Serial Monitor or the Command Palette (ctrl+shift+p). For all commands, if multiple ports are available a list will first be shown to choose the comport to run the command on

  • Connect: Brings up dialogs to connect to a comport. If more than one comport is available, brings up a list of available comports before choosing a baud rate

  • Disconnect: Brings up a list of connected comports to disconnect from

  • Write Line: Brings up an input box at the bottom of the window to write a line to a comport.

    • Command/Write history is saved. In the input box, use Page Up and Page Down to cycle through past entries
  • Write File: Writes the active file to a comport

  • Write Selection(s): Writes the selected text to the comport. Supports multiple selection regions (each selection will be on its own line). If no text is selected, writes the whole file.

  • New Buffer: Opens up a new output buffer for the comport

  • Clear Buffer: Clears the current output buffer for the comport

  • Timestamp Logging: Brings up dialog to enable or disable adding timestamps to the beginning of each line. Timestamps are formatted as [yy-mm-dd hh:mm:ss.xxx]

  • Local Echo: Brings up dialog to enable/disable local echo. Local echo will write all input to the output window

  • Filtering: Brings up a menu to enable/disable filtering of the serial port using a filtering file (see next command). Filtering will create another buffer alongside the main output window to display filtered lines of text based on the filter file of your choice

  • New Filter: Creates a new filter template file for the above command. Template contains more details on the filtering as well. Right clicking a single-line highlighted selection in the output window will bring up an option to create a filter from the selected text

  • Line Endings: Set the line endings type of the comport so the data is correctly displayed in the output. Sublime only cares about Line Feeds, so the text will be edited based on the setting

    • CR: Line endings are carriage return characters only. All CR characters (\r) will be converted to LF (\n)
    • LF: Line endings are line feed characters only. No text manipulation occurs
    • CRLF: Line endings contain both CR and LF. CR characters are removed (default)
  • Layout: Switches the layout of the sublime window. Left/Right puts all input files on the left and serial files on the right, Over/Under puts all input files on the top and output on the bottom

Preferences

Global and port-specific preferences can be specified under Preferences->Package Settings->Serial Monitor->Settings - User. All of the preference possibilities go into more detail in the Settings - Default option in the same menu; use that file as a template for your own preferences

Advanced Commands

For those who want to use these commands for keybindings, etc.

"command": "serial_monitor", "args":{"serial_command":"", ...}

Currently supported serial_command values and optional args for each:

  • "connect":

    • "comport": str - The comport to connect to
    • "baud": int - The baud rate to connect with
    • "enable_timestamps": bool - Enable or disable timestamped logging upon connection
    • "line_endings": str - The line ending settings to use. Should be CR, LF, or CRLF
  • "disconnect":

    • "comport": str - The comport to disconnect from
  • timestamp_logging:

    • "comport": str - The comport to enable/disable timestamp logging on
    • "enable_timestamps": bool - True to enable, False to Disable
  • local_echo:

    • "comport": str - the comport to enable/disable local echo on
  • line_endings:

    • "line_endings": str - THe line ending settings to use. See above for valid values
  • new_buffer:

    • "comport": str - The comport to create a new buffer for
  • clear_buffer:

    • "comport": str - The comport to create a clear the buffer on
  • "write_line":

    • "comport": str - The comport to write a line to
    • "text": str - The text to write to the comport (newline appended to end automatically)
  • "write_file":

    • "comport": str - The comport to write the currently active file to
    • "override_selection": bool - set to true if you want to write the whole file regardless if a region is currently selected
  • filter:

    • "comport": str - the comport to enable/disable filtering on

serial_monitor's People

Contributors

thomasgerstenberg avatar kiltyj 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.