Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
altineller committed Nov 18, 2024
1 parent 01eb23f commit dc0aacd
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,50 +112,6 @@ Qwiic cables are a popular choice for connecting various sensors and actuators t

Create a file named `haton.py` under `$HOME\bin` and put the code below inside it

<div class="highlight notranslate position-relative">
<div class="highlight">
<pre id="code-python-haton"><span></span>
#!/usr/bin/env python
import string
import struct
import sys
import time

from smbus2 import SMBus

with SMBus(1) as bus:

TCA6408_OUTPUT = 0x01
TCA6408_CONFIGURATION = 0x03
TCA6406_ADDRESS = 0x20

# PSEL_3V3_A P0 0x01
# PSEL_3V3_B P1 0x02
# SERIAL_RX_ON P2 0x04
# SERIAL_TX_ON P3 0x08
# PSEL_LIDAR P4 0x10
# LIDAR_TX_ON P5 0x20
# LIDAR_PWM_ON P6 0x40

try:
bus.write_byte_data(TCA6406_ADDRESS, TCA6408_CONFIGURATION, 0x0)
bus.write_byte_data(TCA6406_ADDRESS, TCA6408_OUTPUT, 0x73)
except IOError as e:
print('IOError: %s' % e)


</pre>
</div>
<clipboard-copy style="position:absolute; right:8px; top:8px;" for="code-python-haton">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon">
<path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path>
</svg>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none">
<path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path>
</svg>
</clipboard-copy>
</div>

```python
#!/usr/bin/env python
import string
Expand Down

0 comments on commit dc0aacd

Please sign in to comment.