How to use the node-raspistill.RaspistillInterruptError function in node-raspistill

To help you get started, we’ve selected a few node-raspistill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dlukanin / node-raspistill / examples / with_stop.js View on Github external
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();
    }
github dlukanin / node-raspistill / examples / with_stop_no_file_save.js View on Github external
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();

node-raspistill

Node wrapper for taking photos using Raspberry Pi raspistill app.

MIT
Latest version published 3 years ago

Package Health Score

48 / 100
Full package analysis