Conflict between TinyGPS and Adafruit_CharacterOLED libraries?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
ted0h
 
Posts: 6
Joined: Sun Apr 21, 2013 1:35 pm

Conflict between TinyGPS and Adafruit_CharacterOLED libraries?

Post by ted0h »

Hi, hoping someone can help me with a problem I'm having. I have an Arduino sketch currently running on a Pro Mini 5V, 16 MHz, which takes GPS input and outputs it to an LCD. I'm upgrading the GPS unit to an Adafruit ultimate GPS breakout, and the display to an OLED. The new GPS board seems to be working with the TinyGPS methods I'm already using, but when I tried to incorporate the Adafruit_CharacterOLED library, the sketch stopped working.

Because I initially wasn't sure if the problem was the GPS or the display, I went back to the TinyGPS "test_with_GPS_device" example sketch. Running the sketch with the Adafruit GPS gave the expected results, when I opened the serial monitor it immediately displayed the header info and then position updates every second.

Then, I added the following two lines to the "test_with_GPS_device" sketch:

Code: Select all

#include <Adafruit_CharacterOLED.h> 
Adafruit_CharacterOLED lcd(12, 8, 11, 4, 5, 6, 7);
Now, when I open the serial monitor, it's blank for about 5 seconds, then it displays the header info and position information.

Finally, I added the following lines in the setup block of the sketch:

Code: Select all

lcd.begin(16, 2);
lcd.print("Acquiring..."); 
Now, serial monitor is blank for 15-30 seconds, then the header information pops up, followed by position info every second.

I do get a "Large amount of SRAM used" warning with the original and modified sketches.

When I use the LiquidCrystal library and initialization in the example sketch:

Code: Select all

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 4, 5, 6, 7);
the serial monitor information is displayed immediately.

So, it seems the GPS will work fine with TinyGPS, but for whatever reason, the OLED library isn't fully compatible. Any suggestions on this one? Thanks for your help.

Ted

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Conflict between TinyGPS and Adafruit_CharacterOLED libraries?

Post by adafruit_support_bill »

The Character OLED library is about 90% the same as the Liquid Crystal library. It is slightly larger due to the additional handshaking required by the OLED display. The SRAM warning suggests that you may be close to running out (there is only 2K of SRAM on an Uno). The slightly larger Character OLED library may be just enough to push it over the edge.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”