nodejs rs232

kapp

讀取範例1
    var buffer = ''; 
    port.on('data', function(chunk) { 
        buffer += chunk; 
        var answers = buffer.split(/\r?\n/);
    });  

  var resultString = JSON.parse(result.data);
  text.html("Sensor reading:" + resultString);
  // split it:
  var numbers = split(resultString, ",");