mbed-js-st-serial-interface

1.0.0 • Public • Published

mbed-js-st-serial-interface

Library to communicate with serial terminal.

About library

This library allows using Serial port as an JavaScript editor based on mbed-js-repl-example. The JS program can be written and viewed in Serial port in real-time Serial port terminal.

Requirements

This library is to be used with the following tools:

See this project for more information: mbed-js-st-fw-example

Installation

  • Before installing this library, make sure you have a working JavaScript on Mbed project and the project builds for your target device. Follow mbed-js-st-fw-example to create the project and learn more about using JavaScript on Mbed.

  • Install this library using npm (Node package manager) with the following command:

cd project_path
npm install syed-zeeshan/mbed-js-st-serial-interface

Usage

To use this library, you have to initialize in your main.js as follows:

// Initialize serial interface library
var serial_interface = new SerialInterface();

After initializing, you can connect device with any serial terminal and start coding, the code can be seen in real-time.

  • Run JavaScript program in real-time:

    To run the program, press Ctrl+R. This will execute the JS program and will display the output at serial terminal.

  • Flash JavaScript program to ROM:

    You can also flash the program currently being written using mbed-js-manager library. To flash the code, use Ctrl+F key to flash the code to ROM memory of the device.

Package Sidebar

Install

npm i mbed-js-st-serial-interface

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

34.3 kB

Total Files

10

Last publish

Collaborators

  • syed-zeeshan
  • nikapov