You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+42-42Lines changed: 42 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,15 +1,15 @@
1
1
# Welcome to python_as3935!
2
2
3
-
This Python module let's you control the AS3935 lightning detector. The board used is the MOD-1016 from [EmbeddedAdventures](http://www.embeddedadventures.com/as3935_lightning_sensor_module_mod-1016.html).
3
+
This Python module let's you control the AS3935 lightning detector. The board used is the MOD-1016 from [EmbeddedAdventures](http://www.embeddedadventures.com/as3935_lightning_sensor_module_mod-1016.html).
4
4
5
5
6
6
1. It works with [Pigpio](http://abyz.me.uk/rpi/pigpio/) instead of the common [RPi.GPIO](https://pypi.org/project/RPi.GPIO/), in order to be able to use it without being root.
7
7
2. The communication with the device is done via I2C serial protocol.
8
8
3. It allows you to perform every action described in the [datasheet](http://www.embeddedadventures.com/datasheets/AS3935_Datasheet_EN_v2.pdf).
9
9
10
-
To install it from Pypi:
10
+
To install it from Pypi:
11
11
```
12
-
$ pip instal as3935
12
+
$ pip install as3935
13
13
```
14
14
15
15
@@ -31,22 +31,22 @@ If using a [40-pin GPIO](https://www.raspberrypi.org/documentation/usage/gpio/)
31
31
32
32
Install the Pigpio daemon, either from source or via:
33
33
```
34
-
$ sudo apt install pigpio
34
+
$ sudo apt install pigpio
35
35
```
36
36
Configure *Remote GPIO* using (if on Raspbian):
37
37
38
38
```
39
-
$ sudo raspi-config
39
+
$ sudo raspi-config
40
40
```
41
41
Enable the daemon and start it now:
42
42
```
43
-
$ sudo systemctl enable pigpiod
44
-
$ sudo systemctl start pigpiod
43
+
$ sudo systemctl enable pigpiod
44
+
$ sudo systemctl start pigpiod
45
45
```
46
46
Install the [Python interface](https://pypi.org/project/pigpio/):
47
47
48
48
```
49
-
$ pip install pigpio
49
+
$ pip install pigpio
50
50
```
51
51
52
52
For further information, visit [Pigpio's](http://abyz.me.uk/rpi/pigpio/pigpiod.html) webpage.
@@ -60,40 +60,40 @@ This module has been tested on Python 3.7. It might work on other versions as we
60
60
It is very simple to use. Just import it and create a new object with the configuration you need.
61
61
62
62
```
63
-
from as3935 import AS3935
64
-
import pigpio
63
+
from as3935 import AS3935
64
+
import pigpio
65
65
66
-
irq_pin_number = 4 # BCM number (code after GPIO)
67
-
bus = 1 # On newer Raspberrys is 1
68
-
address = 0x03 # If using MOD-1016 this is the address
0 commit comments