You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's **an example** of toggling GPIO pin 40 inside Script node from the host (via :ref:`XLinkIn``). On `OAK-SoM-Pro <https://docs.luxonis.com/projects/hardware/en/latest/pages/BW2099.html>`__,
124
+
GPIO 40 drives FSYNC signal for both 4-lane cameras, and we have used the code below for this exact reason.
125
+
126
+
.. code-bloc:: python
127
+
128
+
import GPIO
129
+
MX_PIN = 40
130
+
131
+
ret = GPIO.setup(MX_PIN, GPIO.OUT, GPIO.PULL_DOWN)
132
+
toggleVal = True
133
+
134
+
while True:
135
+
data = node.io['in'].get() # Wait for a message from the host computer
136
+
137
+
node.warn('GPIO toggle: ' + str(toggleVal))
138
+
toggleVal = not toggleVal
139
+
ret = GPIO.write(MX_PIN, toggleVal) # Toggle the GPIO
140
+
123
141
Using DepthAI :ref:`Messages <components_messages>`
0 commit comments