This script uses the AS9535 sensor to detect lightning strikes and send tweets with related information : lightning energy, distance to the storm.
This script uses those libraries :
- RaspberryPi-AS3935 :
pip install RPi_AS3935
- Tweepy :
pip install tweepy
You also need to configure I2C on your Raspberry Pi. Adafruit made a tutorial explaining how to.
If you want to know more about how I use it, you can read this article.