From 8ffab27c66bdacfb22a59a2fdadb71dbfd558fed Mon Sep 17 00:00:00 2001 From: TheMarpe Date: Tue, 27 Jul 2021 03:36:35 +0200 Subject: [PATCH 1/4] Updated core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 3df1e1319..c5c3c2c07 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 3df1e13199f72dd830fa46d5e2147bda6de3fea1 +Subproject commit c5c3c2c07c1fd805cc0bef1845c7388fe089730f From ab1b6a608d12e3535ecd1e7d4e32977cb0703005 Mon Sep 17 00:00:00 2001 From: Martin Peterlin Date: Fri, 30 Jul 2021 02:31:08 +0200 Subject: [PATCH 2/4] Added documentation of new Script GPIO API --- docs/source/components/nodes/script.rst | 31 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/docs/source/components/nodes/script.rst b/docs/source/components/nodes/script.rst index 1e8bc1f0a..a5b5123e2 100644 --- a/docs/source/components/nodes/script.rst +++ b/docs/source/components/nodes/script.rst @@ -91,15 +91,34 @@ Usage Interfacing with GPIOs ###################### -In the script node you can interface with GPIOs of the VPU. Currently supported functions are: +In the script node you can interface with GPIOs of the VPU using module GPIO. Currently supported functions are: .. code-block:: python - import GPIO # module - GPIO.read(pin) - GPIO.write(pin, value) - GPIO.setPwm(pin, highCount, lowCount, repeat=0) # repeat == 0 means indefinite - GPIO.enablePwm(pin, enable) + # Module + import GPIO + + # General + GPIO.setup(gpio, dir, pud, exclusive) + GPIO.release(gpio) + GPIO.write(gpio, value) + GPIO.read(gpio) + + # Interrupts + GPIO.waitInterruptEvent(gpio = -1) # blocks until any interrupt or interrupt by specified gpio is fired. Interrupts with callbacks are ignored here + GPIO.hasInterruptEvent(gpio = -1) # returns whether interrupt happened on any or specfied gpio. Interrupts with callbacks are ignored here + GPIO.setInterrupt(gpio, edge, priority, callback = None) # adds interrupt to specified pin + GPIO.clearInterrupt(gpio) # clears interrupt of specified pin + + # PWM + GPIO.setPwm(gpio, highCount, lowCount, repeat=0) # repeat == 0 means indefinite + GPIO.enablePwm(gpio, enable) + + # Enumerations + GPIO.Direction: GPIO.IN, GPIO.OUT + GPIO.State: GPIO.LOW, GPIO.HIGH + GPIO.PullDownUp: GPIO.PULL_NONE, GPIO.PULL_DOWN, GPIO.PULL_UP + GPIO.Edge: GPIO.RISING, GPIO.FALLING, GPIO.LEVEL_HIGH, GPIO.LEVEL_LOW Using DepthAI :ref:`Messages ` ################################################### From c31e9f817405e462e6aaa315c75ddbbb460b7009 Mon Sep 17 00:00:00 2001 From: Martin Peterlin Date: Fri, 30 Jul 2021 16:47:02 +0200 Subject: [PATCH 3/4] Updated core --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 081940b4c..51b9079ad 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 081940b4c2f1ca97d363e718ffa36fe63133d6ea +Subproject commit 51b9079ad1c6c97c9b2c0563cea0d228dfb1a7b9 From 3fff9f2b6e3751492d6559d074c98499c63cd4cd Mon Sep 17 00:00:00 2001 From: Martin Peterlin Date: Tue, 3 Aug 2021 11:36:14 +0200 Subject: [PATCH 4/4] Updated core with SPI speed improvements --- depthai-core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/depthai-core b/depthai-core index 51b9079ad..d846a0b68 160000 --- a/depthai-core +++ b/depthai-core @@ -1 +1 @@ -Subproject commit 51b9079ad1c6c97c9b2c0563cea0d228dfb1a7b9 +Subproject commit d846a0b68323104a0fc658720be2bf913bbff3c4