Skip to content

a node-serialport implementation using BLE for sending and receiving serial data.

Notifications You must be signed in to change notification settings

monteslu/ble-serial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ble-serial

A virtual node-serialport stream implementation that uses Bluetooth Low Energy as the transport.

BLESerialPort

Use BLE to send/receive data to a remote physical device:

var BLESerialPort = require('ble-serial').SerialPort;
var firmata = require('firmata');

//create the mqtt serialport and specify the send and receive topics
var serialPort = new BLESerialPort({
  serviceId: '', //OPTIONAL
  transmitCharacteristic: '', //OPTIONAL
  receiveCharacteristic: '' //OPTIONAL
});

//use the virtual serial port to send a command to a firmata device
var board = new firmata.Board(serialPort, function (err, ok) {
  if (err){ throw err; }
  //light up a pin
  board.digitalWrite(13, 1);
});

About

a node-serialport implementation using BLE for sending and receiving serial data.

Resources

Stars

Watchers

Forks

Packages

No packages published