Comments (10)
The 0x00 there is which register is being read off of the sensor, not the sensor address (Raspberry Pi's were having some trouble with repeated starts when I wrote this library and I haven't revisited it).
Does everything before simulating lightning work? Does this always fail when you simulate lightning or just intermittently?
from raspberrypi-as3935.
It does it intermittently. When no IOError is thrown, it shows up as an disturber. It might be the same issue as #1
from raspberrypi-as3935.
That wouldn't surprise me. I've also found a thread on the RPi forums that addresses a similar issue - maybe that helps?
from raspberrypi-as3935.
Hi @wvanbreukelen - Did you have any success fixing this? If you did, I'd like to close this issue. Thanks!
from raspberrypi-as3935.
Phil,
I am late to this thread but I seem to have the same problem that @wvanbreukelen has. I am using a piezo effect lighter to simulate the lightning. As you can see it detects what it thinks is lightning sometimes. i2cdetect, always detects the board so I don't understand the Errno 5 which I think suggests that it doesn't see the module.
Any suggestions? I have two Pi's, a 2 and a 3, they both act the same.
Regards,
Steve
Waiting for lightning - or at least something that looks like it
Noise level too high - adjusting
We sensed lightning!
It was 1km away. (01:00:15 - 2016/08/30)
Traceback (most recent call last):
File "RaspberryPi-AS3935/demo.py", line 23, in handle_interrupt
reason = sensor.get_interrupt()
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 48, in get_interrupt
self.read_data()
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 234, in read_data
self.registers = self.i2cbus.read_i2c_block_data(self.address, 0x00)
IOError: [Errno 5] Input/output error
Traceback (most recent call last):
File "RaspberryPi-AS3935/demo.py", line 23, in handle_interrupt
reason = sensor.get_interrupt()
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 48, in get_interrupt
self.read_data()
File "/home/pi/RaspberryPi-AS3935/RPi_AS3935/RPi_AS3935.py", line 234, in read_data
self.registers = self.i2cbus.read_i2c_block_data(self.address, 0x00)
IOError: [Errno 5] Input/output error
from raspberrypi-as3935.
Hi,
I'm getting a similar error to the others above. When simulating using a piezo lighter, about half the time I get lightning detected and the other half the same error message as wvanbreukelen and sesykes71.
Would really appreciate some help!
from raspberrypi-as3935.
Does there appear to be any pattern associated with issue? I haven't been able to cause the error to pop back up.
Just brainstorming, but is your Pi connected directly to the sensor? Are there other devices on the I2C bus? Is there more than 12 inches of wire separating the sensor and Pi (some I2C devices can't drive longer distances of wire)?
from raspberrypi-as3935.
Hi, Thanks for coming back to me. No there doesn't seem to be any pattern. Since I last played with this, I now only get at best a single disturber message and then only the error message.
As for your specific suggestions - the Pi is connected via a breadboard to the sensor with no other devices on the I2C bus. There is less than 12" of wire.
Embedded Adventures sent a replacement sensor but the same error is occurring. I have also tried it on a second Pi 3, with an identical error.
from raspberrypi-as3935.
Wondering if this is pathological timing of interference on the communication from the spark? Catching it with a try/except to retry communication could work?
from raspberrypi-as3935.
there,
I was testing out my sensor with your library, but I ran into an issue.
When I try to simulate lightning using a lighter, I mostly gave the following error:Traceback (most recent call last):
File "lightning_web.py", line 38, in register_strike
reason = sensor.get_interrupt()
File "/usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py", line 48, in get_interrupt
self.read_data()
File "/usr/local/lib/python2.7/dist-packages/RPi_AS3935/RPi_AS3935.py", line 228, in read_data
self.registers = self.i2cbus.read_i2c_block_data(self.address, 0x00)
IOError: [Errno 5] Input/output errorI thought of some fixes by myself, like changing 0x00 to 0x03 (i am using the Embedding Systems V8 version), but I doubt this would fix the issue.
Can you think of any solution to solve this problem?
I have the same reason ,I find my pi cannot connect to as3935.I make a i2c to connect wo as3935,but when i used "i2cdectect -y 1" ,I could get nothing .could you give me some message ,thank you.
my e-mail:[email protected]
from raspberrypi-as3935.
Related Issues (20)
- Constant false detection HOT 2
- Help on sensor.set_indoors(True) HOT 5
- Two sensors, not working. HOT 8
- calibration methods added HOT 4
- Add more documentation
- several coments on AS3935 library HOT 6
- Help about new issue raised after latest update HOT 9
- Bugfix found in fork HOT 1
- AS3935 bus address HOT 4
- Output to file HOT 2
- automatic antenna tuning HOT 1
- IOError: [Errno 121] Remote I/O error when LAN cable unplugged HOT 6
- IOError: [Errno 121] Remote I/O error HOT 7
- TypeError: 'module' object is not callable with Python 3.7.3 HOT 3
- demo.py
- Any chance you could add an SPI interface option as well? HOT 1
- AS3935.py; set_indoors missing set_byte command HOT 4
- GPIO Pin for IRQ
- Time delay before reading interrupt HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raspberrypi-as3935.