Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Raspistill = require('node-raspistill').Raspistill;
const RaspistillInterruptError = require('node-raspistill').RaspistillInterruptError;
const raspistill = new Raspistill({
fileName: 'image%04d',
encoding: 'jpg',
width: 640,
height: 480
});
let i = 0;
raspistill.timelapse(1000, 30000, (image) => {
i++;
console.log('got ' + i + ' photo');
if (i === 5) {
console.log('trying to stop');
raspistill.stop();
}
const Raspistill = require('node-raspistill').Raspistill;
const RaspistillInterruptError = require('node-raspistill').RaspistillInterruptError;
const raspistill = new Raspistill({
fileName: 'image%04d',
encoding: 'jpg',
noFileSave: true,
width: 640,
height: 480
});
let i = 0;
raspistill.timelapse(1000, 30000, (image) => {
i++;
console.log('got ' + i + ' photo');
if (i === 5) {
console.log('trying to stop');
raspistill.stop();