pcfens / RaspberryPi-AS3935

A basic library for working with the AS3935 that's connected to the Raspberry Pi.
Other
52 stars 24 forks source link

update for V4 #7

Closed ghost closed 10 years ago

ghost commented 10 years ago

V4 of the module has a problem where the first attempt to read register 0 fails (this is documented on their website). I've solved that by simply catching an IOError exception and then retrying the command. Tested it and it works.

pcfens commented 10 years ago

The only thing I can find on the website is this

There is a firmware bug in the AS3935 that prevents access to register 0x00 when using I2C address 0x00 the first time it is accessed (address 0x00 was used in the previous v2 version of the module).

That implies to me that the new hardware (v4 included) should already be working around this by setting the address to not 0x00.

Can anyone else (@RiccoRammer?) confirm whether or not the demo code here works without modification?

RiccoRammer commented 10 years ago

I can confirm. The v4 works just fine, I used the code and with m module on the new address i think it was 0x03 worked perfectly

ghost commented 10 years ago

Odd. Without the change I did it won't start at all due to an IOException. With the change applied it, well, runs: it gives a couple of messages about noise levels etc. No hits since sunday though.

On Tue, Jun 10, 2014 at 6:23 PM, RiccoRammer notifications@github.com wrote:

I can confirm. The v4 works just fine

--- Original Message ---

From: "Phil Fenstermacher" notifications@github.com Sent: 10 June 2014 5:17 PM To: "pcfens/RaspberryPi-AS3935" RaspberryPi-AS3935@noreply.github.com Cc: "RiccoRammer" riccardo@moredata.co.za Subject: Re: [RaspberryPi-AS3935] update for V4 (#7)

The only thing I can find on the website is this

There is a firmware bug in the AS3935 that prevents access to register 0x00 when using I2C address 0x00 the first time it is accessed (address 0x00 was used in the previous v2 version of the module).

That implies to me that the new hardware (v4 included) should already be working around this by setting the address to not 0x00.

Can anyone else (@RiccoRammer?) confirm whether or not the demo code here works without modification?


Reply to this email directly or view it on GitHub: https://github.com/pcfens/RaspberryPi-AS3935/pull/7#issuecomment-45627418

— Reply to this email directly or view it on GitHub https://github.com/pcfens/RaspberryPi-AS3935/pull/7#issuecomment-45651883 .

www.vanheusden.com www.slimwinnen.nl www.debitcoinspecialist.nl

pcfens commented 10 years ago

Were you able to test this anymore? I don't want to leave the issue untouched if it is an issue, but with conflicting reports I'm hesitant to merge too.

ghost commented 10 years ago

Hi,

It has been running since 10 Juni and has not detected any lightning at all. I think the boards I use are special in some way or maybe plain broken. I also connected them to an arduino and ran some code I found with that: same result. So it's probably something else.

regards

On Fri, Jul 11, 2014 at 1:24 PM, Phil Fenstermacher < notifications@github.com> wrote:

Were you able to test this anymore? I don't want to leave the issue untouched if it is an issue, but with conflicting reports I'm hesitant to merge too.

— Reply to this email directly or view it on GitHub https://github.com/pcfens/RaspberryPi-AS3935/pull/7#issuecomment-48729377 .

www.vanheusden.com www.slimwinnen.nl www.debitcoinspecialist.nl

pcfens commented 10 years ago

Thanks for the quick feedback. Since you seem to think the problem is with your board I'm going to close this for now, but if you discover something else feel free to re-open it or file another one.

Thanks again for the feedback.

ghost commented 10 years ago

Ok!

Please note: I have two identical boards and it happens with both. So maybe the boards are not broken just incompatible in some way. I contacted embedded adventures (the guys selling them) but so far they have not responded (for over a month).

On Fri, Jul 11, 2014 at 1:35 PM, Phil Fenstermacher < notifications@github.com> wrote:

Thanks for the quick feedback. Since you seem to think the problem is with your board I'm going to close this for now, but if you discover something else feel free to re-open it or file another one.

Thanks again for the feedback.

— Reply to this email directly or view it on GitHub https://github.com/pcfens/RaspberryPi-AS3935/pull/7#issuecomment-48730536 .

www.vanheusden.com www.slimwinnen.nl www.debitcoinspecialist.nl

RiccoRammer commented 10 years ago

@flok99 I've used about 3 of the V4 boards, they were all Tune 5, for me they all worked well with @pcfens code, the first one I broke by giving it too much voltage, I could still read/write to the chip however it would not pick up lightning (this was my fault). Whilst I wait for real lightning I flick a light switch to generate noise so I can test the IRQ, (it's winter here so I've not used my project for a few months) I used the v4 board my on a raspberry PI, changing the address and the I2C channel. Can you confirm you can read and write to the chip or is it just not detecting lightning?