Skip to content

Commit

Permalink
more consolestuff
Browse files Browse the repository at this point in the history
  • Loading branch information
VoltVisionFrenchy committed Nov 24, 2013
1 parent b1fd89c commit 88ed74d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ sensor.on('threshold:under', function (data) {
loop.play();
});


console.log('Sensor running');
15 changes: 15 additions & 0 deletions lib/sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@ Sound.prototype.play = function() {
// play = spawn('play', ['-q', this.path]);
play = spawn('aplay', ['-q', '/home/root/audio/wolfhowl.wav']);
console.log('Playing!!!!!', this.path);

play.stdout.on('data', function (data) {
console.log('stdout: ' + data);
});


play.on('close', function (code) {
console.log('child process exited with code ' + code);
});

if (process.pid) {
console.log('Process.pid: ' + process.pid);
}
console.log('process.platform: ' + process.platform);
console.log('process.title: ' + process.title);
}else{
console.log('mockPlay', this.path);
}
Expand Down

0 comments on commit 88ed74d

Please sign in to comment.