File tree Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Expand file tree Collapse file tree 1 file changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -143,23 +143,22 @@ Usage Example
143
143
144
144
* Code Example:
145
145
146
- .. code-block :: shell
146
+ .. code-block :: shell
147
147
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
152
151
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 ()
155
154
156
- as3935 = QwiicAS3935_I2C(i2c) # default address is 0x03
155
+ as3935 = QwiicAS3935_I2C(i2c) # default address is 0x03
157
156
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)
163
162
164
163
Contributing
165
164
============
You can’t perform that action at this time.
0 commit comments