Compare commits

...

4 Commits

Author SHA1 Message Date
Limor "Ladyada" Fried a4e1ee0133
Merge pull request #110 from abachman/abachman-update-IO-tls-fingerprint
update IO TLS fingerprint
2018-02-05 17:17:02 -05:00
Adam Bachman c25d31f813
update IO TLS fingerprint 2018-02-05 17:08:40 -05:00
ladyada 7fffb1e769 bump fix for winc1500 2018-01-29 14:37:03 -05:00
ladyada f0e97737f7 update to wifi101 library 2018-01-29 14:27:41 -05:00
3 changed files with 8 additions and 13 deletions

View File

@ -40,8 +40,9 @@ WiFiClientSecure client;
// Setup the MQTT client class by passing in the WiFi client and MQTT server and login details. // Setup the MQTT client class by passing in the WiFi client and MQTT server and login details.
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY); Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
// io.adafruit.com SHA1 fingerprint // io.adafruit.com SHA1 fingerprint. Current fingerprint can be verified via:
const char* fingerprint = "AD 4B 64 B3 67 40 B5 FC 0E 51 9B BD 25 E9 7F 88 B6 2A A3 5B"; // echo | openssl s_client -connect io.adafruit.com:443 |& openssl x509 -fingerprint -noout
#define AIO_SSL_FINGERPRINT "77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18"
/****************************** Feeds ***************************************/ /****************************** Feeds ***************************************/

View File

@ -11,8 +11,7 @@
#include <SPI.h> #include <SPI.h>
#include "Adafruit_MQTT.h" #include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h" #include "Adafruit_MQTT_Client.h"
#include <Adafruit_WINC1500.h> #include <WiFi101.h>
/************************* WiFI Setup *****************************/ /************************* WiFI Setup *****************************/
#define WINC_CS 8 #define WINC_CS 8
@ -20,8 +19,6 @@
#define WINC_RST 4 #define WINC_RST 4
#define WINC_EN 2 // or, tie EN to VCC #define WINC_EN 2 // or, tie EN to VCC
Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);
char ssid[] = "yournetwork"; // your network SSID (name) char ssid[] = "yournetwork"; // your network SSID (name)
char pass[] = "yourpassword"; // your network password (use for WPA, or use as key for WEP) char pass[] = "yourpassword"; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP) int keyIndex = 0; // your network key Index number (needed only for WEP)
@ -38,7 +35,7 @@ int status = WL_IDLE_STATUS;
/************ Global State (you don't need to change this!) ******************/ /************ Global State (you don't need to change this!) ******************/
//Set up the wifi client //Set up the wifi client
Adafruit_WINC1500Client client; WiFiClient client;
Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY); Adafruit_MQTT_Client mqtt(&client, AIO_SERVER, AIO_SERVERPORT, AIO_USERNAME, AIO_KEY);
@ -60,10 +57,7 @@ Adafruit_MQTT_Subscribe onoffbutton = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAM
void setup() { void setup() {
#ifdef WINC_EN WiFi.setPins(WINC_CS, WINC_IRQ, WINC_RST, WINC_EN);
pinMode(WINC_EN, OUTPUT);
digitalWrite(WINC_EN, HIGH);
#endif
while (!Serial); while (!Serial);
Serial.begin(115200); Serial.begin(115200);
@ -154,4 +148,4 @@ void MQTT_connect() {
delay(5000); // wait 5 seconds delay(5000); // wait 5 seconds
} }
Serial.println("MQTT Connected!"); Serial.println("MQTT Connected!");
} }

View File

@ -1,5 +1,5 @@
name=Adafruit MQTT Library name=Adafruit MQTT Library
version=0.20.0 version=0.20.1
author=Adafruit author=Adafruit
maintainer=Adafruit <info@adafruit.com> maintainer=Adafruit <info@adafruit.com>
sentence=MQTT library that supports the FONA, ESP8266, Yun, and generic Arduino Client hardware. sentence=MQTT library that supports the FONA, ESP8266, Yun, and generic Arduino Client hardware.