cc3000 shield and xively not really working?

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
sarahspins
 
Posts: 1
Joined: Thu Jan 09, 2014 10:56 pm

cc3000 shield and xively not really working?

Post by sarahspins »

Following the directions from http://learn.adafruit.com/adafruit-cc30 ... and-xively I have modified the code to use two DS18B20 temperature sensors rather than the DHT used in the example (I do have one of those somewhere, and if I could find it I could probably wire it up and test the code as is in the example, but I'm not convinced it would behave any differently since my issue isn't with getting data into the JSON output, I have that part working fine). I'm using a retail Arduino Uno R3 and adafruit's cc3000 shield.

My problem is that it seems like it works, and it will send the data successfully once (sometimes 2 or 3 times, and once I got 6 in a row, but haven't gotten close to that again) then it hangs after connecting the next time... and it seems to stop where it connects to send the data to Xively. It doesn't ever fail, it's like the sketch just locks up because it doesn't know what to do, and it won't do anything past that point. I suspect it's just having trouble either sending or receiving data, but rather than having some means of failing, it just hangs the sketch.

Ultimately I'm trying to build a temperature controller that will connect to some relays to turn on heaters, so it's important that the code not just "lock up" at any point because that could result in a dangerous situation if the relays are left on. I have a sketch that already works fine for the relay control using the data logger shield (which logs the time and temperature for me), but in this one I'm just trying to send the temperature data to xively so I can record it (one piece of the puzzle at a time)... but the behavior I'm getting now worries me a great deal.

Here's my code:

Code: Select all

/*************************************************** 
 * This is a sketch to use the CC3000 WiFi chip & Xively
 * 
 * Written by Marco Schwartz for Open Home Automation
 ****************************************************/

// Libraries
#include <Wire.h>
#include <OneWire.h>
#include <DallasTemperature.h>
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
#include<stdlib.h>

// Define CC3000 chip pins
#define ADAFRUIT_CC3000_IRQ   3
#define ADAFRUIT_CC3000_VBAT  5
#define ADAFRUIT_CC3000_CS    10

// Create CC3000 instances
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIV2); // you can change this clock speed
// WLAN parameters
#define WLAN_SSID       "Easter.wifi"
#define WLAN_PASS       "drowssap" 
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_WPA2

// Xively parameters
#define WEBSITE  "api.xively.com"
#define API_key  "Sn9BFZGkmsPwPhC0elE7L0yiLXZX9QZP6DZTSKpkFEfIDxO8"
#define feedID  "1587261525"

uint32_t ip;

// Data wire is plugged into port 6 on the Arduino
#define ONE_WIRE_BUS 6
#define TEMPERATURE_PRECISION 12

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

void setup(void)
{
  // Initialize
  Serial.begin(115200);

  Serial.println(F("\nInitializing..."));
  if (!cc3000.begin())
  {
    Serial.println(F("Couldn't begin()! Check your wiring?"));
    while(1);
  }

}

void loop(void)
{
  // Connect to WiFi network
  cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY);
  Serial.println(F("Connected!"));

  /* Wait for DHCP to complete */
  Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP())
  {
    delay(100);
  }  

  // Get the website IP & print it
  ip = 0;
  Serial.print(WEBSITE); 
  Serial.print(F(" -> "));
  while (ip == 0) {
    if (! cc3000.getHostByName(WEBSITE, &ip)) {
      Serial.println(F("Couldn't resolve!"));
    }
    delay(500);
  }
  cc3000.printIPdotsRev(ip);
  Serial.println();

  sensors.requestTemperatures(); 


  // Get data & transform to string value
  float t = DallasTemperature::toFahrenheit(sensors.getTempCByIndex(0));
  float t2 = DallasTemperature::toFahrenheit(sensors.getTempCByIndex(1));

  char tmp[10];
  char tmp2[10];
  dtostrf(t,5,2,tmp);
  dtostrf(t2,5,2,tmp2);

  String temp = tmp;
  String temp2 = tmp2;

  // Prepare JSON for Xively & get length
  int length = 0;

  String data = "";
  data = data + "\n" + "{\"version\":\"1.0.0\",\"datastreams\" : [ {\"id\" : \"Henry\",\"current_value\" : \"" + temp + "\"},"  + "{\"id\" : \"Webster\",\"current_value\" : \"" + temp2 + "\"}]}";
  length = data.length();
  Serial.print("Data length");
  Serial.println(length);
  Serial.println();

  // Print request for debug purposes
  Serial.print("PUT /v2/feeds/");
  Serial.print(feedID);
  Serial.println(".json HTTP/1.0");
  Serial.println("Host: api.xively.com");
  Serial.print("X-ApiKey: ");
  Serial.println(API_key);
  Serial.print("Content-Length: ");
  Serial.println(length, DEC);
  Serial.print("Connection: close");
  Serial.println();
  Serial.print(data);
  Serial.println();

  // Send request
  Adafruit_CC3000_Client client = cc3000.connectTCP(ip, 80);
  if (client.connected()) {
    Serial.println("Connected!");
    client.println("PUT /v2/feeds/" + String(feedID) + ".json HTTP/1.0");
    client.println("Host: api.xively.com");
    client.println("X-ApiKey: " + String(API_key));
    client.println("Content-Length: " + String(length));
    client.print("Connection: close");
    client.println();
    client.print(data);
    client.println();
    Serial.println("Data Sent!");
  } 
  else {
    Serial.println(F("Connection failed"));    
    return;
  }

  Serial.println(F("-------------------------------------"));
  while (client.connected()) {
    while (client.available()) {
      char c = client.read();
      Serial.print(c);
    }
  }
  client.close();
  Serial.println(F("-------------------------------------"));

  Serial.println(F("\n\nDisconnecting"));
  cc3000.disconnect();

  // Wait 10 seconds until next update
  delay(10000);

}
And what I get in the serial monitor:

Code: Select all

Initializing...
Started AP/SSID scan




Connecting to Easter.wifi...Waiting to connect...Connected!
Request DHCP
api.xively.com -> 216.52.233.120
Data length129

PUT /v2/feeds/1587261525.json HTTP/1.0
Host: api.xively.com
X-ApiKey: Sn9BFZGkmsPwPhC0elE7L0yiLXZX9QZP6DZTSKpkFEfIDxO8
Content-Length: 129
Connection: close

{"version":"1.0.0","datastreams" : [ {"id" : "Top","current_value" : "73.29"},{"id" : "Bottom","current_value" : "72.84"}]}


Connect to 216.52.233.120:80
Connected!
Data Sent!
-------------------------------------
HTTP/1.1 200 OK
Date: Fri, 10 Jan 2014 03:33:09 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 0
Connection: close
X-Request-Id: b50d2d5238abc230eb3a93e2b088f28b1a1b611a
Cache-Control: max-age=0
Vary: Accept-Encoding

-------------------------------------


Disconnecting
Started AP/SSID scan




Connecting to Easter.wifi...Waiting to connect...Connected!
Request DHCP
api.xively.com -> 216.52.233.120
Data length127

PUT /v2/feeds/1587261525.json HTTP/1.0
Host: api.xively.com
X-ApiKey: Sn9BFZGkmsPwPhC0elE7L0yiLXZX9QZP6DZTSKpkFEfIDxO8
Content-Length: 127
Connection: close

{"version":"1.0.0","datastreams" : [ {"id" : "Top","current_value" : "73.18"},{"id" : "Bottom","current_value" : "72.84"}]}


Connect to 216.52.233.120:80
Connected!
As you can see, it successfully sent the data once, then tried again, and it says it connected, but it locked up before sending the first bit of data and it won't do anything beyond that point. Every once in a while when it gets past sending the data, it will hang receiving data back from Xively, which is why I strongly suspect my internet connection (to my house) is to blame, not any of the hardware or my code.

I wrote all of this post up last night, and then just as I was about to post it, I thought to add some watchdog timers to my code to see if that could help it from hanging, which has resulted in it "running" all night reading temperatures (because the arduino now resets every couple of minutes thanks to the watchdog), but it's not really in a way that would make it very functional for controlling my relays - I guess what I am asking is if there a better solution for handling what I'm experiencing?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: cc3000 shield and xively not really working?

Post by adafruit_support_mike »

The diagnostic text doesn't match the code you posted.

The JSON string created by the code you posted contains the strings 'Henry' and 'Webster'. Neither of those appear in the diagnostic text.

Malawi
 
Posts: 9
Joined: Tue Jan 07, 2014 11:24 am

Re: cc3000 shield and xively not really working?

Post by Malawi »

Sounds exactly like my problem.

I have exactly same issues (post http://forums.adafruit.com/viewtopic.ph ... lit=cc3000).
For now i use watchdog on the between Adafruit_CC3000_Client client = cc3000.connectTCP(ip, port); and that kinda helps it not to get stuck.
but this is far from a solution.
I hope you find out what the issue is, so i can solve my problem too.

btw is your fiemware 1.24 too?

User avatar
staffordj
 
Posts: 10
Joined: Thu Jul 23, 2009 2:08 pm

Re: cc3000 shield and xively not really working?

Post by staffordj »

Has this issue been resolved? I am having the same issue with an Arduino Mega and the cc3000 breakout board. I am using it similar to sarahspins with DS18B20's and sending float values using dtostrf and sending 4 temperatures to xively. At first it was hanging on

Adafruit_CC3000_Client client = cc3000.connectTCP(ip, 80);

and did not send anything. I changed it to use just int values instead of float similar to the xively example in the tutorials and it worked for a few minutes but then hung and then would not work at all after that. I can post code and serial output, but it is almost exactly the same as what has been posted already. Any help is appreciated.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: cc3000 shield and xively not really working?

Post by adafruit_support_mike »

As far as we can tell, the problem is simply that the CC3000 loses its wifi connection for a moment due to signal noise or some other external factor. Code that doesn't check the connection before using it will eventually fail.

User avatar
h4kr
 
Posts: 1
Joined: Wed Feb 19, 2014 10:24 pm

Re: cc3000 shield and xively not really working?

Post by h4kr »

I´m having problems with the xively example code from Marcus, initially after looking at the code i found a mistery "Return" in the Send request part I think should not be there, when connection fails it writes to the serial console "Connection Failed" and then due ths return the code will junp who now were and probably hanging your Arduino.

Serial.println("Data Sent!");
}
else {
Serial.println(F("Connection failed"));
return;
}

I still haveing problem with the board hanging after some time in usage (2h aprox.), with the Adafruit_CC3000_Client client = cc3000.connectTCP(ip, 80); returning me "connection error" for hours after the fail start, I guess is something in the library or the code (not much changed, only big change is connect every 5 min instead of 10 secs) from the example that breaks and make my app unable to connect to the xively server and stop sending data.

Any sugestion on how this "connection error" coudl be debugged?

User avatar
devices
 
Posts: 4
Joined: Sun Jun 27, 2010 6:28 pm

Re: cc3000 shield and xively not really working?

Post by devices »

I notice the code from Sarahspins doesn't contain a "sensors.begin()"; statement. I have no trouble connecting & sending data to Xively, but starting up the DallasTemperature Library seems to trash the data stream somehow. I'm using a cc3000 shield & a Uno. I have the same problem sending data to Carriots.

RobDIY
 
Posts: 6
Joined: Sun Feb 23, 2014 4:47 pm

Re: cc3000 shield and xively not really working?

Post by RobDIY »

I have tried to make a 6 sensor temp cloud monitor with the UNO and cc3000 Wifi and using several different services (emomcms, dynamodb and xively). I so far like Xilely the best cause its simplest to setup and is requires less code to send the data. (room was an issue for dynamodb) I have problems with all services / setups because i think there is memory issue with my sketch and library issues with the cc3000. The following sketch works for 4 sensors but has a sending data problem when i add the heartbeat (un comment) into the code anywhere. As you can see the heartbeat seems unrelated to the send data commands except might have memory issues. (might be the setting the pin as input or serial print command)

Code: Select all

/*************************************************** 
 * This is a sketch to use the CC3000 WiFi chip & Xively
 * 
 * Written by Marco Schwartz for Open Home Automation
 ****************************************************/

// Libraries
#include <Adafruit_CC3000.h>
#include <ccspi.h>
#include <SPI.h>
#include <string.h>
#include "utility/debug.h"
#include<stdlib.h>

// Define CC3000 chip pins
#define ADAFRUIT_CC3000_IRQ   3
#define ADAFRUIT_CC3000_VBAT  9
#define ADAFRUIT_CC3000_CS    10

// Thermistor configuration
//#define     THERMISTOR_PIN         0       // Analog pin to read thermistor values.
#define     SERIES_RESISTOR        10000   // Resistor value (in Ohms) in series with the thermistor.
#define     ADC_SAMPLES            5       // Number of ADC samples to average for a reading.

// Change the thermistor coefficient values below to match what you measured
// after running through the calibration sketch.
#define     A_COEFFICIENT          0.001137334704
#define     B_COEFFICIENT          0.000230353689
#define     C_COEFFICIENT          0.000000114420


// Create CC3000 instances
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT,
SPI_CLOCK_DIV2); // you can change this clock speed



// WLAN parameters
#define WLAN_SSID       "network"
#define WLAN_PASS       "password"
// Security can be WLAN_SEC_UNSEC, WLAN_SEC_WEP, WLAN_SEC_WPA or WLAN_SEC_WPA2
#define WLAN_SECURITY   WLAN_SEC_WPA2

// Xively parameters
#define WEBSITE  "api.xively.com"
#define API_key  "put your key here"
#define feedID  "put feed number here"

int THERMISTOR_PIN = 0;
int pulsePin = 8;
unsigned long lastHeartbeat = 0;
unsigned long lastUptimeReport = 0;

int Blue1 = 6;
int Red = 5;
int Blue2 = 4;
int Green = 1;

uint32_t ip;

void setup(void)
{

  //heartbeat();
  pinMode(Blue1, OUTPUT);     
  pinMode(Red, OUTPUT); 
  pinMode(Blue2, OUTPUT); 
  pinMode(Green, OUTPUT); 

  digitalWrite(Red, HIGH);   // turn the LED on (HIGH is the voltage level)
  // Initialize
  Serial.begin(115200);

  Serial.println(F("\nInitializing..."));
  if (!cc3000.begin())
  {
    Serial.println(F("Couldn't begin()! Check your wiring?"));
    while(1);
  }

  cc3000.connectToAP(WLAN_SSID, WLAN_PASS, WLAN_SECURITY);
  Serial.println(F("Connected!"));

  /* Wait for DHCP to complete */
  Serial.println(F("Request DHCP"));
  while (!cc3000.checkDHCP())
  {
    delay(100);
  }  

  // Get the website IP & print it
  ip = 0;
  Serial.print(WEBSITE); 
  Serial.print(F(" -> "));
  while (ip == 0) {
    if (! cc3000.getHostByName(WEBSITE, &ip)) {
      Serial.println(F("Couldn't resolve!"));
    }
    delay(500);
  }
  cc3000.printIPdotsRev(ip);

  digitalWrite(Red, LOW);   // turn the LED on (HIGH is the voltage level)

  /* Display the IP address DNS, Gateway, etc. */
  while (! displayConnectionDetails()) {
    delay(1000);
  }
}
void loop(void)
{
  digitalWrite(Blue1, HIGH);   // turn the LED on (HIGH is the voltage level)
  // Connect to WiFi network
  //heartbeat();

  digitalWrite(Green, HIGH);   // turn the LED on (HIGH is the voltage level)
  THERMISTOR_PIN = 0;
  float currentTemp0 = readTemp() - 273.15;
  if (currentTemp0 < 0)  ( 
  currentTemp0 = 0);

  THERMISTOR_PIN = 1;
  float currentTemp1 = readTemp() - 273.15;
  if (currentTemp1 < 0)  ( 
  currentTemp1 = 0);

  THERMISTOR_PIN = 2;
  float currentTemp2 = readTemp() - 273.15;
  if (currentTemp2 < 0)  ( 
  currentTemp2 = 0);

  THERMISTOR_PIN = 3;
  float currentTemp3 = readTemp() - 273.15;
  if (currentTemp3 < 0)  ( 
  currentTemp3 = 0);

  THERMISTOR_PIN = 4;
  float currentTemp4 = readTemp() - 273.15;
  if (currentTemp4 < 0)  ( 
  currentTemp4 = 0);

  THERMISTOR_PIN = 5;
  float currentTemp5 = readTemp() - 273.15;
  if (currentTemp5 < 0)  ( 
  currentTemp5 = 0);



  //digitalWrite(Green, LOW);   // turn the LED on (HIGH is the voltage level)

  int temp0 = (int) currentTemp0;
  int temp1 = (int) currentTemp1;
  int temp2 = (int) currentTemp2;
  int temp3 = (int) currentTemp3;
  int temp4 = (int) currentTemp4;
  int temp5 = (int) currentTemp5;

  // Prepare JSON for Xively & get length
  int length = 0;

  String data = "";
  data = data + "\n" + "{\"version\":\"1.0.0\",\"datastreams\" : [ {\"id\" : \"PoolCold\",\"current_value\" : \"" + String(temp0) + "\"},"
    + "{\"id\" : \"PoolHot\",\"current_value\" : \"" + String(temp1) + "\"},"
    + "{\"id\" : \"Outside\",\"current_value\" : \"" + String(temp2) + "\"},"
    + "{\"id\" : \"SolarCold\",\"current_value\" : \"" + String(temp3) + "\"}]}";


  // + "{\"id\" : \"SolarHot\",\"current_value\" : \"" + String(temp4) + "\"}]}";
  // + "{\"id\" : \"SolarMid\",\"current_value\" : \"" + String(temp5) + "\"}]}";




  length = data.length();
  Serial.print("Data length");
  Serial.println(length);
  Serial.println();

  // Print request for debug purposes
  Serial.print("PUT /v2/feeds/");
  Serial.print(feedID);
  Serial.println(".json HTTP/1.0");
  Serial.println("Host: api.xively.com");
  Serial.print("X-ApiKey: ");
  Serial.println(API_key);
  Serial.print("Content-Length: ");
  Serial.println(length, DEC);
  Serial.print("Connection: close");
  Serial.println();
  Serial.print(data);
  Serial.println();

  // Send request1
  digitalWrite(Blue2, HIGH);   // turn the LED on (HIGH is the voltage level)
  Adafruit_CC3000_Client client = cc3000.connectTCP(ip, 80);
  if (client.connected()) {
    Serial.println("Connected!");
    client.println("PUT /v2/feeds/" + String(feedID) + ".json HTTP/1.0");
    client.println("Host: api.xively.com");
    client.println("X-ApiKey: " + String(API_key));
    client.println("Content-Length: " + String(length));
    client.print("Connection: close");
    client.println();
    client.print(data);
    client.println();


  } 
  else {
    Serial.println(F("Connection failed"));    
    return;
  }














  digitalWrite(Blue2, LOW);   // turn the LED on (HIGH is the voltage level)
  Serial.println(F("-------------------------------------"));
  while (client.connected()) {
    while (client.available()) {
      char c = client.read();
      Serial.print(c);

    }
  }
  client.close();
  Serial.println(F("-------------------------------------"));

  Serial.println(F("\n\nDisconnecting"));
  // cc3000.disconnect();


  // Wait 5 seconds until next update
  delay(5000);
 // heartbeat();
}














// Take a reading of the thermistor and return the current temp in kelvin.
float readTemp() {
  float R = 0;
  for (int i = 0; i < ADC_SAMPLES; ++i) {
    R += analogRead(THERMISTOR_PIN);
  }
  R /= (float)ADC_SAMPLES;
  R = (1023 / R) - 1;
  R = SERIES_RESISTOR / R;
  return 1/(A_COEFFICIENT + B_COEFFICIENT*log(R) + C_COEFFICIENT*pow(log(R), 3));
}


bool displayConnectionDetails(void)
{
  uint32_t ipAddress, netmask, gateway, dhcpserv, dnsserv;

  if(!cc3000.getIPAddress(&ipAddress, &netmask, &gateway, &dhcpserv, &dnsserv))
  {
    Serial.println(F("Unable to retrieve the IP Address!\r\n"));
    return false;
  }
  else
  {
    Serial.print(F("\nIP Addr: ")); 
    cc3000.printIPdotsRev(ipAddress);
    Serial.print(F("\nNetmask: ")); 
    cc3000.printIPdotsRev(netmask);
    Serial.print(F("\nGateway: ")); 
    cc3000.printIPdotsRev(gateway);
    Serial.print(F("\nDHCPsrv: ")); 
    cc3000.printIPdotsRev(dhcpserv);
    Serial.print(F("\nDNSserv: ")); 
    cc3000.printIPdotsRev(dnsserv);
    Serial.println();
    return true;
  }

}


void heartbeat() {
  //Sink current to drain charge from watchdog circuit
  pinMode(pulsePin, OUTPUT);
  digitalWrite(pulsePin, LOW);
  delay(300);
  // Return to high-Z
  pinMode(pulsePin, INPUT);
  lastHeartbeat = millis();
  Serial.println("Beat");
}






and when the first heartbeat is un commented in the void loop section, i get this
Connect to 216.52.233.120:80

Connected!

-------------------------------------

HTTP/1.1 400 Bad Request

Date: Sat, 01 Mar 2014 22:41:01 GMT

Content-Type: application/json; charset=utf-8

Content-Length: 149

Connection: close

X-Request-Id: fd66b6-removed-cac6c2c639



{"title":"JSON Parser Error","errors":"lexical error: invalid char in json text. SolarCold\",\"current_value\":\u0016\u0012\u0016\u0012\u0016\u0012"}-------------------------------------



Disconnecting

since this sketch works (without the heartbeat) with 4 sensors and 4 leds, it should work with your relays in place of the leds.

User avatar
tinkurlab
 
Posts: 4
Joined: Mon Mar 17, 2014 10:51 pm

Re: cc3000 shield and xively not really working?

Post by tinkurlab »

RobDIY - any luck solving your issue? I've having a similar issue. I have a basic Xively script that works just fine w/ the CC3000. However, as I increase the complexity of the code and add more global variables and functions, the Strings get corrupted or truncated before sending to Xively. I image it has something to do with a memory issue. I'm just starting to understand the different between the Arduino's dynamic memory (SRAM) and storage memory (Flash). Read a bit more about it at http://forums.adafruit.com/viewtopic.php?f=31&t=45627

RobDIY
 
Posts: 6
Joined: Sun Feb 23, 2014 4:47 pm

Re: cc3000 shield and xively not really working?

Post by RobDIY »

Yes, I have tried many different cloud database systems and all fail for 6 sensors. I believe its because the send string becomes too longs and overloads the memory / buffer. (im guessing here) There is probably a way to write the code to send in different put strings but I have settled using mysql and php. Its made the coding very easy as i have no login / keys protection. The arduino essentially sends the sensor readings to a local / hosted server to a php file which converts , parse and formats and anything else you wants and then puts into mysql for retrieval. The sketch / ardrinio is stable, 24 hrs a day (about two weeks up so far) and stays connecteds to wifi / server. I am looking for a good free hosting service for mysql / php right now. I tried one but it has lots of ads.

The php / mysql way is here

https://github.com/ranger9/cc3000-basestation

User avatar
tinkurlab
 
Posts: 4
Joined: Mon Mar 17, 2014 10:51 pm

Re: cc3000 shield and xively not really working?

Post by tinkurlab »

RobDIY - thanks for sharing. I fixed my issue mostly through SRAM optimization. I started by adding multiple SRAM checks throughout my code using the example provided at http://learn.adafruit.com/memories-of-a ... ree-memory. I was able to reduce the overall SRAM usage through a combination of F() ing every static string and also by switching from JSON to CSV when using the Xively API. CSV requires a lot less string characters. I started with the CC3000 WebClient example http://learn.adafruit.com/adafruit-cc30 ... /webclient and refactored to use the Xively API w/ CSV format using the Xively example http://arduino.cc/en/Tutorial/XivelyClient. I'll post my code in the next week or two.

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

Return to “Arduino Shields from Adafruit”