Jump to content
43oh

AS3935 Lightning Detector


Recommended Posts

Did you put the source in the libraries folder of Energia. All the source files should sit within a folder that sits in the msp430 libraries. Sort of like:

 

energia-0101E0012\hardware\msp430\libraries\Striker

 

Where "Striker" is the source code of the library (which looks like that repository).

Link to post
Share on other sites

Hi. Thanks for the reply. sorry forgot to state, I'm on a mac, but yeh, all source files are in the folder.

/Users/myname/Documents/Energia/Libraries/as3935/Striker

Thats what I don't get.

I have a separate library for Energia and 1 for Arduino.

All very odd?

post-37471-0-49733800-1402324332_thumb.png

Link to post
Share on other sites

I believe you have too many levels of folders, Energia will only look into the first level folder after libraries for files to compile. So instead of 

 

/Users/myname/Documents/Energia/Libraries/as3935/Striker

 

Move all the source files into:

 

/Users/myname/Documents/Energia/Libraries/as3935/

Link to post
Share on other sites

It's actually not a library but a Sketch with a lot of files. There is an issue with the way I2cMaster.h is included in I2cMaster.ino. Here is how I got it to compile:

 

1: Put all files into a folder "Striker". I suggest that you just put it into your Energia Sketch folder. It can be located anywhere however.

2: Choose Open from the file menu and browse to the Striker folder then choose Striker.ino.

3: Click on the tab I2cMaster and find #include <I2cMaster.h>. Change this to #include "I2cMaster.h"

4: Hit verify.

 

With that said, #include <I2cMaster.h> should have worked. I will look into what the issue is but you can use the work around above in the meantime.

 

Robert

Link to post
Share on other sites

I've tried as you suggested but now get the following errors;

 

 

as3935.cpp.o: In function `parseCommand()':
/Applications/Striker.ino:581: undefined reference to `as3935_addr'
/Applications/Striker.ino:590: undefined reference to `as3935_addr'
collect2: ld returned 1 exit status
 
Now listed as;
 
/Users/myname/Documents/Energia/Libraries/as3935/
Link to post
Share on other sites

 

I've tried as you suggested but now get the following errors;

 

 

as3935.cpp.o: In function `parseCommand()':
/Applications/Striker.ino:581: undefined reference to `as3935_addr'
/Applications/Striker.ino:590: undefined reference to `as3935_addr'
collect2: ld returned 1 exit status
 
Now listed as;
 
/Users/myname/Documents/Energia/Libraries/as3935/

 

Move it out of Libraries.  Just /Users/myname/Documents/Energia/as3935/

Link to post
Share on other sites

Robert, with regards to the code change, and that I don't have a grate knowledge of code, I had looked at that, but thought the problem was with the uppercase letters, so had changed them to lowercase and file names etc.

 So I was in the right place, but looking into it the wrong way.

At least I've learnt something!

 

Dizzwold.

Link to post
Share on other sites

Robert, with regards to the code change, and that I don't have a grate knowledge of code, I had looked at that, but thought the problem was with the uppercase letters, so had changed them to lowercase and file names etc.

 So I was in the right place, but looking into it the wrong way.

At least I've learnt something!

 

Dizzwold.

If you are on Windows then the case of the letters does not matter since the windows file system is case insensitive. Linux and Mac however have filesystems that are case sensitive.

Link to post
Share on other sites

That's worth knowing, but also interesting as I'm a mac user. I've not changed the case of the letters, kept them as they where, just followed you advise and changed <> to "", and it compiles?

I had change the case of the letters in many places, in the sketches and file titles, but as this all failed, I didn't save the changes and kept them as the original sketch / file.

I have noticed though with Arduino IDE that this dose seem to apply, but again with these sketches and file names it compiled first time, no issue.

Odd!

I'll try to keep this post up-dated, but at the moment I'm waiting on a delivery of Ferric Chloride to make the circuit boards.

I'm looking to make this detector mobile, so will also "I believe", have to change the code for an LCD unit.

Like previously stated, a complete newbie to code. I have many books, but for eg "Hello World", book 1 writes the code oneway, book 2 another way and book 3 yet another.

Very confusing. So I'm learning code as I go, by using previously written code then manipulating It to suit my needs, "may-be a**e-backward, but I'm learning from that".

If I get stuck, re-manipulating the code for an LCD unit I will post here, but wish to learn from playing with the code. Help is always welcome, If I can't accomplish my Goal.

 

Again. Thank you for the Info and the reply.

 

Dizzwold.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...