How to use the osc.SerialPort function in osc

To help you get started, we’ve selected a few osc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github colinbdclark / osc.js-examples / nodejs / index.js View on Github external
var osc = require("osc");

/*******************
 * OSC Over Serial *
 *******************/

// Instantiate a new OSC Serial Port.
var serialPort = new osc.SerialPort({
    devicePath: process.argv[2] || "/dev/tty.usbmodem221361"
});

serialPort.on("message", function (oscMessage) {
    console.log(oscMessage);
});

// Open the port.
serialPort.open();


/****************
 * OSC Over UDP *
 ****************/

var getIPAddresses = function () {