take raspistill to background
This commit is contained in:
Родитель
39bbb5d578
Коммит
7dcae9eb11
|
@ -31,12 +31,10 @@ function monitorDoor(){
|
|||
console.log("got something at the door");
|
||||
readTag('cam', function(data){
|
||||
console.log("camera gives me this data--", data);
|
||||
readTag('sound', function(data){
|
||||
console.log("sound gives me this data--", data);
|
||||
writeTag('sound', 'somebody at the doooooor', function(resp){
|
||||
console.log("got this response --", resp);
|
||||
});
|
||||
})
|
||||
writeTag('sound', 'somebody at the doooooor', function(resp){
|
||||
console.log("got this response --", resp);
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
|
@ -28,7 +28,7 @@ app.use(cors());
|
|||
|
||||
app.get("/", function(req, res) {
|
||||
var spawn = require('child_process').spawn;
|
||||
var snaphot = spawn('raspistill', ["-o", "cam.jpg"]);
|
||||
var snaphot = spawn('raspistill', ["-o", "cam.jpg", "&"]);
|
||||
res.send("/home/pi/restofthings/slave/cam.jpg");
|
||||
});
|
||||
app.listen(port);
|
||||
|
|
|
@ -26,7 +26,7 @@ app.use(cors());
|
|||
|
||||
app.put("/", function(req, res, next) {
|
||||
var text = req.text;
|
||||
console.log("POST /, text is : ", text);
|
||||
console.log("PUT /, text is : ", text);
|
||||
require('child_process').spawn('node', ["textToSpeech.js", text]);
|
||||
res.send("text processed is " + text);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче