Script camera control
=====================

This example shows how to use :ref:`Script` node. It controls the :ref:`ColorCamera` to
capture a still image every second.

Demo
####

.. raw:: html

    <div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;">
        <iframe src="https://user-images.githubusercontent.com/18037362/126664262-bdd8b567-052c-4985-95df-c4da67f1e3c1.gif" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe>
    </div>

Setup
#####

.. include::  /includes/install_from_pypi.rst

Source code
###########

.. tabs::

    .. tab:: Python

        Also `available on GitHub <https://github.com/luxonis/depthai-python/blob/main/examples/Script/script_camera_control.py>`__

        .. literalinclude:: ../../../../examples/Script/script_camera_control.py
           :language: python
           :linenos:

    .. tab:: C++

        Also `available on GitHub <https://github.com/luxonis/depthai-core/blob/main/examples/Script/script_camera_control.cpp>`__

        .. literalinclude:: ../../../../depthai-core/examples/Script/script_camera_control.cpp
           :language: cpp
           :linenos:

.. include::  /includes/footer-short.rst
