mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-26 02:47:17 +00:00
[fix] Changed require('util') to require('util') for compatibility with node v0.8
This commit is contained in:
parent
aabbd418c7
commit
190fada42d
1 changed files with 4 additions and 4 deletions
|
|
@ -1,16 +1,16 @@
|
|||
// To test with a z-wave device, I recommend: http://www.aeon-labs.com/site/products/view/2/
|
||||
|
||||
var SerialPort = require("../serialport").SerialPort;
|
||||
var sys = require("sys");
|
||||
var util = require('util');
|
||||
|
||||
var serial_port = new SerialPort("/dev/ttyUSB0");
|
||||
serial_port.write(new Buffer([0x01, 0x03, 0x00, 0x20,220]));
|
||||
sys.puts("write");
|
||||
util.puts("write");
|
||||
serial_port.read();
|
||||
/*
|
||||
serial_port.on("data", function(d){
|
||||
sys.puts("here");
|
||||
sys.puts(d);
|
||||
util.puts("here");
|
||||
util.puts(d);
|
||||
serial_port.close();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue