1.0.0 • Published 6 years ago

mbed-js-st-spi v1.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

mbed-js-spi

JavaScript wrappers for SPI by STMircroelectronics.

About library

Helper class providing functions for DevSPI library (part of X_NUCLEO_COMMON) in JavaScript.

Requirements

This library is to be used with the following tools:

See this project for more information: mbed-js-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-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-spi

Dependents

Install this library first if using I2C for connecting with the following devices:

Usage

// To initialize SPI with mosi, miso, sclk pins
var spi = SPI(mosi_pin, miso_pin, sclk_pin);

//sample (Nucleo-F476RG)
var spi = SPI(PB_15, NC, PB_13);