Skip to content

Commit 27982b3

Browse files
committed
move to WiFi101 for WINC1500
1 parent 63cd825 commit 27982b3

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

AdafruitIO_WINC1500.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,20 @@
1313

1414
#include "AdafruitIO_WINC1500.h"
1515

16-
Adafruit_WINC1500 WiFi(WINC_CS, WINC_IRQ, WINC_RST);
1716

1817
AdafruitIO_WINC1500::AdafruitIO_WINC1500(const char *user, const char *key, const char *ssid, const char *pass):AdafruitIO(user, key)
1918
{
2019
_ssid = ssid;
2120
_pass = pass;
22-
_client = new Adafruit_WINC1500SSLClient;
21+
_client = new WiFiSSLClient;
2322
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
2423
}
2524

2625
AdafruitIO_WINC1500::AdafruitIO_WINC1500(const __FlashStringHelper *user, const __FlashStringHelper *key, const __FlashStringHelper *ssid, const __FlashStringHelper *pass):AdafruitIO(user, key)
2726
{
2827
_ssid = (const char*)ssid;
2928
_pass = (const char*)pass;
30-
_client = new Adafruit_WINC1500SSLClient;
29+
_client = new WiFiSSLClient;
3130
_mqtt = new Adafruit_MQTT_Client(_client, _host, _port);
3231
}
3332

@@ -42,9 +41,7 @@ AdafruitIO_WINC1500::~AdafruitIO_WINC1500()
4241
void AdafruitIO_WINC1500::_connect()
4342
{
4443

45-
pinMode(WINC_EN, OUTPUT);
46-
digitalWrite(WINC_EN, HIGH);
47-
delay(100);
44+
WiFi.setPins(WINC_CS, WINC_IRQ, WINC_RST, WINC_EN);
4845

4946
// no shield? bail
5047
if(WiFi.status() == WL_NO_SHIELD)

AdafruitIO_WINC1500.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include "Arduino.h"
1818
#include "AdafruitIO.h"
1919
#include "SPI.h"
20-
#include "Adafruit_WINC1500.h"
20+
#include "WiFi101.h"
2121
#include "Adafruit_MQTT.h"
2222
#include "Adafruit_MQTT_Client.h"
2323

@@ -40,7 +40,8 @@ class AdafruitIO_WINC1500 : public AdafruitIO {
4040
void _connect();
4141
const char *_ssid;
4242
const char *_pass;
43-
Adafruit_WINC1500SSLClient *_client;
43+
44+
WiFiSSLClient *_client;
4445

4546
};
4647

0 commit comments

Comments
 (0)