Jump to content
43oh

Trouble installing libraries from GitHub on Energia


Recommended Posts

Hey all, I'm very new to programming microcontrollers so I'm hoping I'm not going to be too annoying around here. I've done my best to seek out solutions to my problems here and elsewhere without luck. I need some guidance.

 

Here's what I'm using:

 CC3200-LAUNCHXL Revision 4.1-B

with 430BOOST-ADS1118 revision 1.1

I'm programming it with energia-1.6.10E18 on a Windows 7 64 bit Dell

 

As per the Energia.nu site, I have upgraded the firmware and reformatted the flash memory.

 

I have loaded several example sketches with Energia successfully to test the WiFi and other features and every thing seems to be working fine. (without the boosterpack.)

 

I'm stuck trying to download and install the Libraries necessary to interface with the boosterpack. From what I can tell, I need libraries: ADS1118 and LCDDRIVER. I have found these on GitHub but I don't understand how to install these properly. As I understand it, the most direct way is to download a .zip file of the libraries and then install them using the Energia library manager. On GitHub, downloading as a .zip is only available at the topmost level of the repository. The repository is the entire Energia software package so it is quite large and I'm pretty certain that route won't work. Here's the one I'm looking at:https://github.com/ArduCAM/Energia/tree/master/hardware/c2000/libraries

 

I've also tried copying and pasting the text code into an open Energia sketch and saving it as .ccp and .h files, but the compiler doesn't seem to like it.

 

Just for completeness, my end goal is creating a pottery kiln remote WiFi monitor and data logger, similar to this project:https://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/11/14/temperature-measurement-for-lab-and-science-projects

If all fails, I'll go back to following this as written, but when I saw that TI had a WiFi launchpad, I thought I would try it.

 

Thanks for any help you can offer.

 

 

Link to post
Share on other sites

Hi @@cwpotter

 

It sounds like an interesting project.  That boosterpack looks pretty neat.

 

I don't have any experience with the 430BOOST-ADS1118 but took a quick look at this and here are some things that you should look into...

  • The library you link to seems to have been written for the C2000 - so you would need to port it to the CC3200. 
  • You definitely don't want to download the entire thing if it is written for the C2000 - probably just the .ino, .cpp and .h files.  Error messages will tell you where to proceed from there.  Do they say something is missing?  Then look for it in the repository.
  • Libraries are installed in Energia the same way they are installed for Arduino with the exception of location - see for example this:  https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/arduino-libraries?view=all
  • Note that you can find the correct location for user libraries by opening File ==> Preferences in Energia which shows sketch locations.  At this location will be a folder called libraries.  Install libraries there.
  • To be honest, I would probably use an earlier version of Energia
  • Sometimes it is easier to start over and use existing code as a go-by.  You have 3 sources apparently :)  the C2000 sketch, the firmware for the G2553 that comes with the backpack (probably not Energia), and the code at element14 - none of it for the CC3200 although the C2000 appears to have been written for Energia.  How much sense does the code in these sources make to you?  If not much, then you are going to do some homework to get this going with anything other than the RPi.  Provided of course the RPi code already does what you want pretty much.
Link to post
Share on other sites

Thanks for looking at this Fmilburn...

Given that these are the libraries I can find, I was ready to work on porting them to the 3200, but was naively thinking that this would mostly involve pin assignments.

 

Again, this might be so basic that I'm missing something but my real problem is understanding how to "save" a library file. I'm only working with Energia and have no other coding experience. Do I need another code editor program in order to save files as .h or .cpp files? When I have done this within Energia, it throws up error messages when I try to compile. Specifically, what I'm doing is copy and pasting the code as text into an open Energia window and saving it as a .cpp or .h file (appropriately) in a new library folder in the proper location. When I verify the code, it gives me an error message something like " you can't save sketches as library files."

I have successfully installed libraries by downloading .zip files from Github, but in that case it was a stand alone repository of the library alone... Github won't allow downloading a .zip of a single folder in this repository.

 

Why would you suggest using an earlier version of Energia? Ease of use, bigger libraries, more support for the 3200?

 

I'm aware that there is a lot I'm missing, but am patient and I am using this project as a way to learn a bit of coding. Given that I'm starting from zero, my plan (such as it is) is to find parts of existing code and piece them together for my purpose. But right now I can't even run a test of the boosterpack as I can't get the libraries.

Yes, the element14 project pretty much does what I want to do and I may just go back to that.

 

Thanks again, I appreciate you taking the time to talk with me about this.

 

 

 

Hi @@cwpotter

 

It sounds like an interesting project.  That boosterpack looks pretty neat.

 

I don't have any experience with the 430BOOST-ADS1118 but took a quick look at this and here are some things that you should look into...

  • The library you link to seems to have been written for the C2000 - so you would need to port it to the CC3200.
  • You definitely don't want to download the entire thing if it is written for the C2000 - probably just the .ino, .cpp and .h files.  Error messages will tell you where to proceed from there.  Do they say something is missing?  Then look for it in the repository.
  • Libraries are installed in Energia the same way they are installed for Arduino with the exception of location - see for example this:  https://learn.adafruit.com/adafruit-all-about-arduino-libraries-install-use/arduino-libraries?view=all
  • Note that you can find the correct location for user libraries by opening File ==> Preferences in Energia which shows sketch locations.  At this location will be a folder called libraries.  Install libraries there.
  • To be honest, I would probably use an earlier version of Energia
  • Sometimes it is easier to start over and use existing code as a go-by.  You have 3 sources apparently :)  the C2000 sketch, the firmware for the G2553 that comes with the backpack (probably not Energia), and the code at element14 - none of it for the CC3200 although the C2000 appears to have been written for Energia.  How much sense does the code in these sources make to you?  If not much, then you are going to do some homework to get this going with anything other than the RPi.  Provided of course the RPi code already does what you want pretty much.

 

Link to post
Share on other sites

 

Given that these are the libraries I can find, I was ready to work on porting them to the 3200, but was naively thinking that this would mostly involve pin assignments.

I suspect it may be mostly a case of pin assignment but you won't know until you get into it. 

 

Again, this might be so basic that I'm missing something but my real problem is understanding how to "save" a library file. I'm only working with Energia and have no other coding experience. Do I need another code editor program in order to save files as .h or .cpp files? When I have done this within Energia, it throws up error messages when I try to compile. Specifically, what I'm doing is copy and pasting the code as text into an open Energia window and saving it as a .cpp or .h file (appropriately) in a new library folder in the proper location. When I verify the code, it gives me an error message something like " you can't save sketches as library files."

I have successfully installed libraries by downloading .zip files from Github, but in that case it was a stand alone repository of the library alone... Github won't allow downloading a .zip of a single folder in this repository.

Try this...  Create a new tab using the tab button shown by the arrow below in Energia.  Name the tabs the same as the .h and .cpp files.  Copy paste the contents from git into the tabs.  When you save the sketch it will save these tabs along with it and they will be there when you open it up again.

post-45284-0-36876900-1478367661_thumb.jpg

 

 

Why would you suggest using an earlier version of Energia? Ease of use, bigger libraries, more support for the 3200?

V18 is new with omissions and changes from previous versions.  If you aren't familiar with Energia and don't need V18 features it may be better to stick with V17.  Bugs if any and omissions will be fixed eventually.  Personal choice.

 

I'm aware that there is a lot I'm missing, but am patient and I am using this project as a way to learn a bit of coding. Given that I'm starting from zero, my plan (such as it is) is to find parts of existing code and piece them together for my purpose. But right now I can't even run a test of the boosterpack as I can't get the libraries.

Yes, the element14 project pretty much does what I want to do and I may just go back to that.

It sounds like a good plan - I hope you give the CC3200 a try and see how it goes.  In any event, report back on how the boosterpack works for you.

Link to post
Share on other sites

Alright, thanks for the tip on using tabs in Energia...I gave it a quick try and it seems to be working.

 

I also downloaded V17 to give it a try. I'll keep both versions around for now and see which works better for me.

 

Off to learn more....

 

Thanks!

Link to post
Share on other sites

Actually you can copy each folder that interest you in the libraries folder for your board.

On my linux machine and for my board (TM4C1294), the libraries directory is located under

/home/liviu/.energia15/packages/energia/hardware/tivac/1.0.2/libraries/

Putting there a new folder with a .cpp and a .h files inside, is enough to "create" a new library.

If you put inside an examples sub-folder, containing example sketches, you'll have also the examples in Energia -> File -> Examples.

 

HTH,

Liviu

Link to post
Share on other sites

Thanks @@LiviuM,

I'll give that a try....I think part of the problem I was having with this approach before was that in V18, there isn't a library folder for my board, only for the 430.  There is a hardware folder for the cc3200 in V17. So thanks again @@Fmilburn for suggesting that I go back a version.

 

Also @@Fmilburn, I do remember seeing that project. I might be able to scavenge some code from there, too. I'm not looking to automate anything, though. The kiln already has a microcontroller based system for that...and I do not want to hook a 2200 degree F appliance to the IOT. :P

 

Thanks guys, I was starting to get a little dispirited. :)

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...