|
15 | 15 |
|
16 | 16 | # 1. Connection of the device |
17 | 17 | If using a [40-pin GPIO](https://www.raspberrypi.org/documentation/usage/gpio/) Raspberry Pi, the device should be connected as follows: |
18 | | -|Pin on AS3935| Pin name on RPi | Pin number (BCM) | |
19 | | -|--|--|--| |
20 | | -| Vcc | 3.3V | -- | |
21 | | -| IRQ | Any available GPIO| e.g. 4| |
22 | | -|SCL | Clock | 3 | |
| 18 | + |
| 19 | +| Pin on AS3935 | Pin name on RPi | Pin number (BCM) | |
| 20 | +|----|----|----| |
| 21 | +| Vcc | 3.3V | Any | |
| 22 | +| IRQ | Any available GPIO| e.g. 4 | |
| 23 | +| SCL | Clock | 3 | |
23 | 24 | | SDA | Data | 2 | |
24 | | -|GND | Ground | -- | |
| 25 | +| GND | Ground | Any | |
| 26 | + |
25 | 27 |
|
26 | 28 |
|
27 | 29 | # 2. Requisites |
@@ -58,7 +60,7 @@ This module has been tested on Python 3.7. It might work on other versions as we |
58 | 60 | It is very simple to use. Just import it and create a new object with the configuration you need. |
59 | 61 |
|
60 | 62 | ``` |
61 | | - from python-as3935 import AS3935 |
| 63 | + from as3935 import AS3935 |
62 | 64 | import pigpio |
63 | 65 | |
64 | 66 | irq_pin_number = 4 # BCM number (code after GPIO) |
@@ -103,7 +105,7 @@ There are other Python modules that allow you to use the AS3935 sensor. However, |
103 | 105 | It is licensed under the GNU General Public License v3.0 (please read LICENSE.txt) |
104 | 106 |
|
105 | 107 | ``` |
106 | | - pythonAS3935 |
| 108 | + python_AS3935 |
107 | 109 | Copyright (C) 2019 Eloi Codina Torras |
108 | 110 |
|
109 | 111 | This program is free software: you can redistribute it and/or modify |
@@ -131,9 +133,9 @@ It is licensed under the GNU General Public License v3.0 (please read LICENSE.tx |
131 | 133 | ## 5.2 Class AS3935 |
132 | 134 | It provides an object to control the AS3935. |
133 | 135 |
|
134 | | -*:param* **irq**: (int) GPIO pin number the IRQ is connected at (BCM number) |
135 | | -*:param* **bus**: (int, optional) the bus the AS3935 is connected at. Default = 1 |
136 | | -*:param* **address**: (int, optional) the address of the AS3935. Default = 0x03 |
| 136 | + - **irq**: (int) GPIO pin number the IRQ is connected at (BCM number) |
| 137 | + - **bus**: (int, optional) the bus the AS3935 is connected at. Default = 1 |
| 138 | + - **address**: (int, optional) the address of the AS3935. Default = 0x03 |
137 | 139 |
|
138 | 140 | You can access the following properties from this object: |
139 | 141 |
|
|
0 commit comments