Skip to content

Commit 1cb13f2

Browse files
authored
Merge pull request #16 from fourstix/b_fix_typos
Fixed formatting and example code
2 parents cdcb56f + 71b14cb commit 1cb13f2

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

README.rst

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,23 +143,22 @@ Usage Example
143143

144144
* Code Example:
145145

146-
.. code-block:: shell
146+
.. code-block:: shell
147147
148-
# import the CircuitPython board and busio libraries
149-
import board
150-
import busio
151-
import sparkfun_qwiicas3935
148+
# import the CircuitPython board and busio libraries
149+
import board
150+
import sparkfun_qwiicas3935
152151
153-
# Create bus object using the board's I2C port
154-
i2c = busio.I2C(board.SCL, board.SDA)
152+
# Create bus object using the board's I2C port
153+
i2c = board.I2C()
155154
156-
as3935 = QwiicAS3935_I2C(i2c) # default address is 0x03
155+
as3935 = QwiicAS3935_I2C(i2c) # default address is 0x03
157156
158-
# OR create a library object using the board's SPI port
159-
# spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
160-
# cs = digitalio.DigitalInOut(board.CE0)
161-
# cs.direction = digitalio.Direction.OUTPUT
162-
# as3935 = QwiicAS3935_SPI(spi, cs)
157+
# OR create a library object using the board's SPI port
158+
# spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
159+
# cs = digitalio.DigitalInOut(board.CE0)
160+
# cs.direction = digitalio.Direction.OUTPUT
161+
# as3935 = QwiicAS3935_SPI(spi, cs)
163162
164163
Contributing
165164
============

0 commit comments

Comments
 (0)