-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into update_depth_visualziation
- Loading branch information
Showing
11 changed files
with
99 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
git+https://github.com/luxonis/pybind11_mkdoc.git@47a353ae22a3ca2fe1ca47f47b38613dcfb1043b | ||
git+https://github.com/luxonis/pybind11_mkdoc.git@59746f8d1645c9f00ebfb534186334d0154b5bd6 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,5 @@ | ||
.. raw:: html | ||
|
||
<h2>Got questions?</h2> | ||
<h2>Got questions?</h2> | ||
|
||
We're always happy to help with code or other questions you might have. | ||
|
||
.. raw:: html | ||
|
||
<div class="cta-row cta-row-short"> | ||
<div class="cta-box"> | ||
<a href="https://discord.gg/luxonis"> | ||
<img src="https://docs.luxonis.com/en/latest/_images/discord.png" alt="Discord"/> | ||
<h5 class="cta-title">Community Discord</h5> | ||
</a> | ||
</div> | ||
<div class="cta-box"> | ||
<a href="https://discuss.luxonis.com/"> | ||
<img src="https://docs.luxonis.com/en/latest/_images/forum.png" alt="forum"/> | ||
<h5 class="cta-title">Discussion Forum</h5> | ||
</a> | ||
</div> | ||
<div class="cta-box"> | ||
<a href="mailto:[email protected]"> | ||
<img src="https://docs.luxonis.com/en/latest/_images/email.png" alt="forum"/> | ||
<h5 class="cta-title">Email Support</h5> | ||
</a> | ||
</div> | ||
</div> | ||
Head over to <a href="https://discuss.luxonis.com/"><strong>Discussion Forum</strong></a> for technical support or any other questions you might have. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
Script UART communication | ||
========================= | ||
|
||
This example uses :ref:`Script` node for `UART communication <https://en.wikipedia.org/wiki/Universal_asynchronous_receiver-transmitter>`__. Note that OAK | ||
cameras don't have UART pins easily disposed, and we soldered wires on `OAK-FFC-4P <https://docs.luxonis.com/projects/hardware/en/latest/pages/DD2090.html>`__ | ||
to expose UART pins. | ||
|
||
.. note:: | ||
|
||
This should only be run on OAK-FFC-4P, as other OAK cameras might have different GPIO configuration. | ||
|
||
Demo | ||
#### | ||
|
||
.. raw:: html | ||
|
||
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> | ||
<iframe src="https://www.youtube.com/embed/nbS1BczO5sE" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe> | ||
</div> | ||
|
||
|
||
.. figure:: https://user-images.githubusercontent.com/18037362/232458809-a36dc418-6bb5-411f-9172-5130a926191d.jpg | ||
|
||
Oscilloscope connected to the OAK-FFC-4P UART pins | ||
|
||
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_uart.py>`__ | ||
|
||
.. literalinclude:: ../../../../examples/Script/script_uart.py | ||
:language: python | ||
:linenos: | ||
|
||
.. tab:: C++ | ||
|
||
Not yet available | ||
|
||
|
||
.. include:: /includes/footer-short.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env python3 | ||
''' | ||
NOTE: This should only be run on OAK-FFC-4P, as other OAK cameras might have different GPIO configuration! | ||
''' | ||
import depthai as dai | ||
import time | ||
|
||
# Start defining a pipeline | ||
pipeline = dai.Pipeline() | ||
|
||
script = pipeline.create(dai.node.Script) | ||
script.setScript(""" | ||
import serial | ||
import time | ||
ser = serial.Serial("/dev/ttyS0", baudrate=115200) | ||
i = 0 | ||
while True: | ||
i += 1 | ||
time.sleep(0.1) | ||
serString = f'TEST_{i}' | ||
ser.write(serString.encode()) | ||
""") | ||
# Define script for output | ||
script.setProcessor(dai.ProcessorType.LEON_CSS) | ||
|
||
|
||
config = dai.Device.Config() | ||
# Get argument first | ||
GPIO = dai.BoardConfig.GPIO | ||
config.board.gpio[15] = GPIO(GPIO.OUTPUT, GPIO.ALT_MODE_2) | ||
config.board.gpio[16] = GPIO(GPIO.INPUT, GPIO.ALT_MODE_2) | ||
config.board.uart[0] = dai.BoardConfig.UART() | ||
|
||
|
||
with dai.Device(config) as device: | ||
device.startPipeline(pipeline) | ||
print("Pipeline started") | ||
while True: | ||
time.sleep(1) |