Skip to content

Instantly share code, notes, and snippets.

// Found at : https://forums.developer.apple.com/thread/25440
//
// GameViewController.swift
// testgc
//
// Created by John McManus on 06/11/2015.
// Copyright (c) 2015 AppyAppster Limited. All rights reserved.
//
import UIKit
import SpriteKit
//Found at : http://stackoverflow.com/questions/23684802/node-js-serialport-synchronous-write-read
function Device (serial) {
this._serial = serial;
this._queue = queue;
this._busy = false;
this._current = null;
var device = this;
serial.on('data', function (data) {
if (!device._current) return;