Hello!
I'm working on a project where I have an Adafruit Ultimate GPS breakout module connected to an Arduino Uno Wifi board. I have followed the guide here: Ciao Rest Client Guide to connect my board to ThingSpeak using the Ciao library. This works fine for me, and I am able to get a separate program to pull GPS data from the module connected to the board.
When I put these two programs together, I run out of global memory space. I have trimmed my program considerably to the bare bones, and I am still running into problems because 80% of the space is still being taken up by global variables. Here is my very sparse and trimmed code:
I am using fake data to send to ThingSpeak in this example
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
#include <Wire.h>
#include <Ciao.h>
SoftwareSerial mySerial(3, 2);
Adafruit_GPS GPS(&mySerial);
void setup()
{
Ciao.begin();
//Serial.begin(9600);
GPS.begin(9600);
GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
GPS.sendCommand(PMTK_SET_NMEA_UPDATE_5HZ);
GPS.sendCommand(PMTK_API_SET_FIX_CTL_5HZ);
delay(1000);
}
void loop()
{
//Code to parse GPS data goes here, but takes up a lot of memory
Ciao.write( "rest" , "api.thingspeak.com", "/update?api_key=Q6SB31YSY9352OW6&field1=29&field2=19");
delay(30000); // Thinkspeak policy
}
Is there a more 'memory cheap' way of connecting to a web server?
The Ciao library and the Adafruit GPS library take up a considerable amount of space. I know there is the Ethernet library, and I have imported it in my project to use instead of Ciao, but I can't figure out how to get it to work with my board. I don't even know if it can work with this board.