Go Down

Topic: Arduino Cloud with Adafruit CC3000 (Read 2973 times) previous topic - next topic

dalbo

It is possible to use an Adafruit CC3000 shield in the same easy way of Arduino Wifi Shield?

I tried the wizard choosing the Arduino Wifi Shield and I obtained the following code:

Code: [Select]


#include <WiFi101.h>
#include <ArduinoCloud.h>

/////// Wifi Settings ///////
char ssid[] = "";
char pass[] = "";


// Arduino Cloud settings and credentials
const char userName[]   = "dalbo";
const char thingName[] = "xxxx";
const char thingId[]   = "xxxxx";
const char thingPsw[]  = "xxxxxx";


WiFiSSLClient sslClient;


// build a new object "ciao"
ArduinoCloudThing ciao;


void setup() {
  Serial.begin (9600);

  // attempt to connect to WiFi network:
  Serial.print("Attempting to connect to WPA SSID: ");
  Serial.println(ssid);

  while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
    // unsuccessful, retry in 4 seconds
    Serial.print("failed ... ");
    delay(4000);
    Serial.print("retrying ... ");
  }


  ciao.begin(thingName, userName, thingId, thingPsw, sslClient);
  ciao.enableDebug();
 
 
}

void loop() {
  ciao.poll();

 
  delay(1000);
 
  delay(1000);
}


Do you think that If I change just the portion:

Code: [Select]

while (WiFi.begin(ssid, pass) != WL_CONNECTED) {
    // unsuccessful, retry in 4 seconds
    Serial.print("failed ... ");
    delay(4000);
    Serial.print("retrying ... ");


using the correct library from Adafruit, is it can work?

The
Code: [Select]
WiFiSSLClient sslClient; is from the Wifi shield library or is it a common function of arduino?


Thank you so much for your availability,

Luca

sandeepmistry

Hi Luca,

Does the library for the CC3000 support SSL? Arduino Cloud requires SSL. Let me know if you have a link to the library, I can take a quick look.

dalbo

Hi sandeepmistry,

I dont' thing so: Here the link https://github.com/adafruit/Adafruit_CC3000_Library

If it is not, do you have any idea?

Thank you so much for yout availability

Luca

sandeepmistry

Hi Luca,

Yes, it does not support SSL. SSL is needed by Arduino Cloud so that your data is sent securely between the board and server.

I would recommend using a WINC1500 based WiFi board, like the MKR1000 or WiFi101 shield.

Go Up