Adafruit GFX and, LEDBackpack libraries - tips on how to get them working

Hi,

I have an Adafruit alphanumeric LED (2160 - Quad Alphanumeric Display - Pure Green 0.54 Digits w/ Backpack : ID 2160 : $13.95 : Adafruit Industries, Unique & fun DIY electronics and kits) and it works great on my Arduinos. Now I am trying to setup a remote temperature sensor and would like to use the display to show the temperature locally.

It uses the libraries listed above, but only the newer revs include support for the alpha display. The libraries inside the Spark IDE are all broken and so aren’t helpful.

I have been trying to port the libraries myself (source code here and here), but it has been a disaster. I removed all mention of wire.h and WProgram.h, but now I am getting a ton of compile errors. (On a side note, the thread below talks about WProgram.h)

Which brings me to my question. Has anyone got this working? If so, can you point to a working version. (BKO, before you answer, I tested yours and it is an old version that does not support the Alpha display.) If not, can anyone provide guidance on how to port it over?

Thank you in advance.

1 Like

I have also been trying to port these. I’m having issues getting them to talk to my backpack. I think it’s an I2C timing/speed issue (there’s a thread on that somewhere) so add that to the list of stuff which needs addressing. I’ll work on it this weekend at the very latest

Hi @JL_678

These are really easy to port! I know that @peekay123 has already ported the GFX library. The port for the LED library should be simple–add the include for application.h and update the #if logic for Spark. Things like WProgram and F() do nothing on Spark and should be defined as macros that pass through their inputs.

I have a kid’s school event to attend tonight so I know I can’t do it quickly–maybe @peekay123 (who has done about a million ports so far) can work on it–if not I will look at it on Friday evening.

1 Like

@JL_678, the Adafruit_GFX library is already on the web IDE and I can port the Adafruit-LED-Backpack library pretty quickly. The I2C issues mentioned by @harrisonhjones can cause issues with the displays but that can be addressed after you get everything compiling and flashed on your Core. For simplicity, I will only port the multisegment quadalphanum example. :smile:

2 Likes

Please do, i would love to use it :slight_smile: myself

@JL_678 and @harrisonhjones, OMG!! I just realized I had already ported this library :stuck_out_tongue: I did not set it up for the IDE but you can find it here and import it into IDE tabs if you wish (I prefer the CLI or DEV). :smile:

2 Likes

Awesome! Thank you. I will test it out today.

Hi,

Just a quick update . I implemented these libraries in the web IDE and wired up the display and can confirm that they work perfectly. Thank you @peekay123! I really appreciate your sharing these.

2 Likes

I could do with an easy to port example of the adafruit bicolor 8x8 matrix. I have very little coding knowledge but I did manage to get it up and running on arduino but no idea what I need to do on soars core. I am also hoping the spark core can run on a closed wifi network, not connected to the Internet as i need it to work in the field… Literally!

Hi,

The process is very easy. You just use the code from @peekay123 Github site.

The trick is to go into the development environment and click the little plus in the upper right. You need to to do this twice and it will create two sets of .cpp and .h tabs. You then need to rename those those tabs (by clicking on them) to the same names that is in the GitHub site. Then copy the content from each file in GitHub to the tab with the same name and then you are done.

From a coding viewpoint, I used the same code from Arduino with no issues…

Finally, on your WiFi question, I am no expert but believe that an Internet connection is required for Spark remote control. This is because I believe that the Spark cloud is the part that you communicate with when sending commands to the board. Others can confirm, but I believe that this to be the case.

1 Like

@JL_678, there is nothing more satisfying then helping someone and then having that person help someone else. Good job!

@minstrel27, using the Core on a closed network is possible IF you manage the connection yourself. Using the System Modes, you can disable the need for a Cloud connection altogether and even disable the wifi portion using WiFi commands. Some members have created code that “tests” for a wifi connection at regular intervals and when found, connect to the Cloud or to their own server to exchange information. Hope that helps! :smiley:

2 Likes

Does anyone have a Fritzing diagram to show how to wire up this alphanumeric display + backpack from Adafruit please? @JL_678 perhaps? :smile:

Hi,

Yes, no problem. I don’t have one and will get back with more details. Do you need the code too? It may be in the thread, but I cannot currently view it.

1 Like

@JL_678 Thanks so much! Some code appears to be in this thread, but if you have it all together and don’t mind sharing then that would be hugely appreciated :smile:

I’ve tried using the example code from the LED Backpack library, and wiring based on the setup for an Arduino Uno… but it did something weird and I had to set the Photon to safe mode and flash with Tinker to revive it! :frowning:

So, I discovered what my wiring issue was! I was wiring up to A4 and A5, as per the Arduino Uno instructions. Turns out, according to this post, that I needed to use D0 and D1. So now the demo code works! :smiley:

Hi,

That is good news. I did review the wiring last night and you are correct that D1 and D0 are the two pins used besides power and ground. I am glad that it got it working. Mine has been working perfectly for a a year.

1 Like

Wow, nice work! Now I just need to work out how to program it to tell the time… I’ll get there eventually!