Git Product home page Git Product logo

Comments (10)

pcfens avatar pcfens commented on August 17, 2024

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.

wvanbreukelen avatar wvanbreukelen commented on August 17, 2024

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.

pcfens avatar pcfens commented on August 17, 2024

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.

pcfens avatar pcfens commented on August 17, 2024

Hi @wvanbreukelen - Did you have any success fixing this? If you did, I'd like to close this issue. Thanks!

from raspberrypi-as3935.

sesykes71 avatar sesykes71 commented on August 17, 2024

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.

dlitchfield avatar dlitchfield commented on August 17, 2024

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.

pcfens avatar pcfens commented on August 17, 2024

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.

dlitchfield avatar dlitchfield commented on August 17, 2024

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.

jrleeman avatar jrleeman commented on August 17, 2024

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.

ggggson avatar ggggson commented on August 17, 2024

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 error

I 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.