removes client id from all example sketches
This commit is contained in:
parent
f1499b484a
commit
9a11d83cf5
@ -45,18 +45,14 @@
|
||||
// Setup the main CC3000 class, just like a normal CC3000 sketch.
|
||||
Adafruit_CC3000 cc3000 = Adafruit_CC3000(ADAFRUIT_CC3000_CS, ADAFRUIT_CC3000_IRQ, ADAFRUIT_CC3000_VBAT);
|
||||
|
||||
// Store the MQTT server, client ID, username, and password in flash memory.
|
||||
// Store the MQTT server, username, and password in flash memory.
|
||||
// This is required for using the Adafruit MQTT library.
|
||||
const char MQTT_SERVER[] PROGMEM = AIO_SERVER;
|
||||
// Set a unique MQTT client ID using the AIO key + the date and time the sketch
|
||||
// was compiled (so this should be unique across multiple devices for a user,
|
||||
// alternatively you can manually set this to a GUID or other random value).
|
||||
const char MQTT_CLIENTID[] PROGMEM = __TIME__ AIO_USERNAME;
|
||||
const char MQTT_USERNAME[] PROGMEM = AIO_USERNAME;
|
||||
const char MQTT_PASSWORD[] PROGMEM = AIO_KEY;
|
||||
|
||||
// Setup the CC3000 MQTT class by passing in the CC3000 class and MQTT server and login details.
|
||||
Adafruit_MQTT_CC3000 mqtt(&cc3000, MQTT_SERVER, AIO_SERVERPORT, MQTT_CLIENTID, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
Adafruit_MQTT_CC3000 mqtt(&cc3000, MQTT_SERVER, AIO_SERVERPORT, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
|
||||
// You don't need to change anything below this line!
|
||||
#define halt(s) { Serial.println(F( s )); while(1); }
|
||||
|
@ -35,14 +35,14 @@
|
||||
// Create an ESP8266 WiFiClient class to connect to the MQTT server.
|
||||
WiFiClient client;
|
||||
|
||||
// Store the MQTT server, client ID, username, and password in flash memory.
|
||||
// Store the MQTT server, username, and password in flash memory.
|
||||
// This is required for using the Adafruit MQTT library.
|
||||
const char MQTT_SERVER[] PROGMEM = AIO_SERVER;
|
||||
const char MQTT_USERNAME[] PROGMEM = AIO_USERNAME;
|
||||
const char MQTT_PASSWORD[] PROGMEM = AIO_KEY;
|
||||
|
||||
// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
|
||||
Adafruit_MQTT_Client mqtt(&client, MQTT_SERVER, AIO_SERVERPORT, "", MQTT_USERNAME, MQTT_PASSWORD);
|
||||
Adafruit_MQTT_Client mqtt(&client, MQTT_SERVER, AIO_SERVERPORT, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
|
||||
/****************************** Feeds ***************************************/
|
||||
|
||||
|
@ -52,18 +52,14 @@ Adafruit_FONA fona = Adafruit_FONA(FONA_RST);
|
||||
|
||||
/************ Global State (you don't need to change this!) ******************/
|
||||
|
||||
// Store the MQTT server, client ID, username, and password in flash memory.
|
||||
// Store the MQTT server, username, and password in flash memory.
|
||||
// This is required for using the Adafruit MQTT library.
|
||||
const char MQTT_SERVER[] PROGMEM = AIO_SERVER;
|
||||
// Set a unique MQTT client ID using the AIO key + the date and time the sketch
|
||||
// was compiled (so this should be unique across multiple devices for a user,
|
||||
// alternatively you can manually set this to a GUID or other random value).
|
||||
const char MQTT_CLIENTID[] PROGMEM = __TIME__ AIO_USERNAME;
|
||||
const char MQTT_USERNAME[] PROGMEM = AIO_USERNAME;
|
||||
const char MQTT_PASSWORD[] PROGMEM = AIO_KEY;
|
||||
|
||||
// Setup the FONA MQTT class by passing in the FONA class and MQTT server and login details.
|
||||
Adafruit_MQTT_FONA mqtt(&fona, MQTT_SERVER, AIO_SERVERPORT, MQTT_CLIENTID, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
Adafruit_MQTT_FONA mqtt(&fona, MQTT_SERVER, AIO_SERVERPORT, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
|
||||
// You don't need to change anything below this line!
|
||||
#define halt(s) { Serial.println(F( s )); while(1); }
|
||||
|
@ -35,18 +35,14 @@
|
||||
// Create a YunClient instance to communicate using the Yun's brighe & Linux OS.
|
||||
YunClient client;
|
||||
|
||||
// Store the MQTT server, client ID, username, and password in flash memory.
|
||||
// Store the MQTT server, username, and password in flash memory.
|
||||
// This is required for using the Adafruit MQTT library.
|
||||
const char MQTT_SERVER[] PROGMEM = AIO_SERVER;
|
||||
// Set a unique MQTT client ID using the AIO key + the date and time the sketch
|
||||
// was compiled (so this should be unique across multiple devices for a user,
|
||||
// alternatively you can manually set this to a GUID or other random value).
|
||||
const char MQTT_CLIENTID[] PROGMEM = __TIME__ AIO_USERNAME;
|
||||
const char MQTT_USERNAME[] PROGMEM = AIO_USERNAME;
|
||||
const char MQTT_PASSWORD[] PROGMEM = AIO_KEY;
|
||||
|
||||
// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
|
||||
Adafruit_MQTT_Client mqtt(&client, MQTT_SERVER, AIO_SERVERPORT, MQTT_CLIENTID, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
Adafruit_MQTT_Client mqtt(&client, MQTT_SERVER, AIO_SERVERPORT, MQTT_USERNAME, MQTT_PASSWORD);
|
||||
|
||||
/****************************** Feeds ***************************************/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user