diff --git a/docs/source/components/nodes/script.rst b/docs/source/components/nodes/script.rst index 61df4b082..45efcf6db 100644 --- a/docs/source/components/nodes/script.rst +++ b/docs/source/components/nodes/script.rst @@ -120,6 +120,24 @@ In the script node you can interface with GPIOs of the VPU using module GPIO. Cu GPIO.PullDownUp: GPIO.PULL_NONE, GPIO.PULL_DOWN, GPIO.PULL_UP GPIO.Edge: GPIO.RISING, GPIO.FALLING, GPIO.LEVEL_HIGH, GPIO.LEVEL_LOW +Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn`). On `OAK-SoM-Pro `__, +GPIO 40 drives FSYNC signal for both 4-lane cameras, and we have used the code below for this exact reason. + +.. code-block:: python + + import GPIO + MX_PIN = 40 + + ret = GPIO.setup(MX_PIN, GPIO.OUT, GPIO.PULL_DOWN) + toggleVal = True + + while True: + data = node.io['in'].get() # Wait for a message from the host computer + + node.warn('GPIO toggle: ' + str(toggleVal)) + toggleVal = not toggleVal + ret = GPIO.write(MX_PIN, toggleVal) # Toggle the GPIO + Using DepthAI :ref:`Messages ` ################################################### diff --git a/docs/source/includes/container-encoding.rst b/docs/source/includes/container-encoding.rst index 2a03545ce..61ecbec38 100644 --- a/docs/source/includes/container-encoding.rst +++ b/docs/source/includes/container-encoding.rst @@ -1,3 +1,14 @@ Encoded bitstream (either MJPEG, H264, or H265) from the device can also be **saved directly into .mp4 container** with no computational overhead on the host computer. See `demo here `__ -for more information. \ No newline at end of file +for more information. + +**Matroska** + +Besides ``ffmpeg`` and ``.mp4`` video container (which is patent encumbered), you could also use the ``mkvmerge`` +(see `MKVToolNix `__ for GUI usage) and ``.mkv`` video container +to mux encoded stream into video file that is supported by all major video players +(eg. `VLC `__) + +.. code-block:: + + mkvmerge -o vid.mkv video.h265 \ No newline at end of file