dizzwold 0 Posted June 9, 2014 Share Posted June 9, 2014 Hi. I'm a newbie to Energia. I have a code Written by Skye Sweeney for Lightning Detection on the Arduino. When used with the Arduino it compiles fine, but with Energia I get the following errors?; I2cMaster.ino:21:23: fatal error: I2cMaster.h: No such file or directory compilation terminated. www.github.com/skyesweeney/striker Any Ideas? Quote Link to post Share on other sites
zlalanne 37 Posted June 9, 2014 Share Posted June 9, 2014 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). Quote Link to post Share on other sites
dizzwold 0 Posted June 9, 2014 Author Share Posted June 9, 2014 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? Quote Link to post Share on other sites
zlalanne 37 Posted June 9, 2014 Share Posted June 9, 2014 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/ Quote Link to post Share on other sites
energia 484 Posted June 9, 2014 Share Posted June 9, 2014 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 Quote Link to post Share on other sites
dizzwold 0 Posted June 9, 2014 Author Share Posted June 9, 2014 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/ Quote Link to post Share on other sites
spirilis 1,265 Posted June 9, 2014 Share Posted June 9, 2014 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/ Quote Link to post Share on other sites
dizzwold 0 Posted June 9, 2014 Author Share Posted June 9, 2014 Hi guy's. Thanks Robert. That did the trick. Nice1 Also thanks to spirilis and zlalanne for your input. Cheers guy's Thank you. Quote Link to post Share on other sites
dizzwold 0 Posted June 9, 2014 Author Share Posted June 9, 2014 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. Quote Link to post Share on other sites
energia 484 Posted June 9, 2014 Share Posted June 9, 2014 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. dizzwold 1 Quote Link to post Share on other sites
dizzwold 0 Posted June 9, 2014 Author Share Posted June 9, 2014 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. Quote Link to post Share on other sites
dizzwold 0 Posted June 16, 2014 Author Share Posted June 16, 2014 Hi Robert. Can I pm you? If so how? Dizzwold. Quote Link to post Share on other sites
energia 484 Posted June 17, 2014 Share Posted June 17, 2014 You should be able to go here: http://forum.43oh.com/user/16062-energia/ and then click the "Send me a message" button on the right. Robert Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.