Skip to content

Commit

Permalink
fix errors in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
furbrain committed May 14, 2023
1 parent 7dfe00b commit 99018e3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Uncomment the below if you use native CircuitPython modules such as
# digitalio, micropython and busio. List the modules you use. Without it, the
# autodoc module docs will fail to generate with a warning.
# autodoc_mock_imports = ["digitalio", "busio"]
autodoc_mock_imports = ["digitalio", "busio", "asyncio"]

autodoc_preserve_defaults = True

Expand Down
12 changes: 9 additions & 3 deletions examples/laser_egismos_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@
from laser_egismos import Laser

periph_power = digitalio.DigitalInOut(board.D5)
periph_power.switch_to_output(True)
periph_power.switch_to_output(False)
laser_power = digitalio.DigitalInOut(board.D0)
laser_power.switch_to_output(True)
laser_power.switch_to_output(False)

time.sleep(0.5)
time.sleep(0.3)
print("power on")
periph_power.switch_to_output(True)
print("laser power enable")
laser_power.switch_to_output(True)
time.sleep(0.1)
uart = busio.UART(board.D2, board.D1, baudrate=9600)
print("start talking")
laser = Laser(uart)
laser.set_buzzer(False)
laser.set_laser(True)
Expand Down
2 changes: 1 addition & 1 deletion laser_egismos.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def distance(self) -> float:

class AsyncLaser(_LaserBase):
"""
Same as `Laser`, but with async methods, requires the `~asyncio` module
Same as `Laser`, but with async methods, requires the `asyncio` module
"""

def __init__(self, uart: busio.UART, address=0x01):
Expand Down

0 comments on commit 99018e3

Please sign in to comment.