Skip to main content
shopping_basket Basket 0

Detecting Lightning with an Arduino

Andrew Back
Open source (hardware and software!) advocate, Treasurer and Director of the Free and Open Source Silicon Foundation, organiser of Wuthering Bytes technology festival and founder of the Open Source Hardware User Group.


February 16, 2014 23:01

Please can you help me?
When I try to run the code gives me the following:
'AS3935' does not name a type to
LightningDetector: 48: error: 'AS3935' does not name a type
LightningDetector.pde: In function 'void setup ()':
LightningDetector: 64: error: 'AS3935' was not declared in this scope
LightningDetector.pde: In function 'void loop ()':
LightningDetector: 102: error: 'AS3935' was not declared in this scope
LightningDetector.pde: In function 'void printAS3935Registers ()':
LightningDetector: 130: error: 'AS3935' was not declared in this scope
Can you help me?
Already used several versions of Arduino and the error is always the same

0 Votes

July 24, 2013 23:39

hi yall,

i will like to interfacing the IC AS3935 with the AT89C51AC2 from ATMEL using I2C BUS , could somebody help me with the Code ?

i'm not really into Programming.. and i really need some help.

thx in Advance


0 Votes

March 30, 2013 03:14

@aldebaran - I tried sending a message to you through the contact function here on designspark, but I'm not sure it is working. Sorry to hear of the trouble with the board - i'm more than happy to help please send me an email at jayson at tautic dot com with the detail you've collected on the issue. Best Regards, Jayson

0 Votes

March 8, 2013 20:37

Greetings everyone:
I purchased the The Franklin Lightning Sensor breakout board from these guys: ... sor-board/

As I wanted to use a PIC processor to control it, I wrote code to communicate with it using the compiler that came with my PIC development system. I chose the I2C interface as I ultimately intended to attach other sensors to that interface. I referred to all the data that I could find concerning the wiring, capabilities and protocol for that chip. That interface was rather difficult to understand from the confusing documentation provided by AMS. So I decided to use SPI as it is easier to debug via my logic analyzer. Tried everything but no luck. I checked all the wiring and power to make sure that it was correct and it was, so I don't believe that I have killed the chip.

I went looking for help and examples but all the code that I could find as an example is locked up in libraries. I wrote up the entire thing, complete with pictures of the wave forms and sent it of to the chip manufacture several weeks ago: ... sor/AS3935

No replies so far. So I tried to communicate with the tindie vendor of the breakout board and as far as I can find there is no way to communicate with them.

I am at an impasse at the moment as I cannot tell if I am doing something wrong, if the chip is dead or something else. Can anyone help on this?

Thanks in advance...

0 Votes

January 30, 2013 01:03

Just a note that Arduino UNO will work fine with the library and Tautic card.
With the USB UNO, I didn't have to change the library or example code. I just connected the pins as follows:

breakout pin arduino pin Uno

VDD 5V - Mega 2560
MOSI 51 11
MISO 50 12
SCLK 52 13
IRQ 2 2
CS 53 10

Then plugged it in and build & installed the example. Connected to it over USB serial and got the above mentioned output. I am in Florida, so plenty of lightning... even a chance of a storm in a day or two from now!

0 Votes

January 2, 2013 14:21


Do you think that is possible to use the AS3935 board with a arduino uno instead of a arduino mega ?

thank you very much.


0 Votes

November 16, 2012 18:03

link to AS3935 data -page Austria ... ing-Sensor

pdf manual can be downloaded. no free samples available from ams.
price per chip 3.55USD..

I consider to get one chip and make my own "breakout board" in conjunction
with Cypress PSoC3 Kit 030 , while i have no Arduino at hand.

greetz Markus

0 Votes

November 16, 2012 15:58

The link to the lightning board on tindie changed over night after an upgrade. You can now find them here: ... sor-board/

0 Votes

Related Content

DesignSpark Electrical Logolinkedin