Skip to content

Commit b3633cf

Browse files
authored
Create AdafruitIO_MKR1010.h
This new file is a copy of the original AdafruitIO_MKR1000.h but modified for the Arduino MKR1010
1 parent 2837f73 commit b3633cf

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/wifi/AdafruitIO_MKR1010.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*!
2+
* @file AdafruitIO_MKR1010.h
3+
*
4+
* Adafruit invests time and resources providing this open source code.
5+
* Please support Adafruit and open source hardware by purchasing
6+
* products from Adafruit!
7+
*
8+
* Copyright (c) 2015-2016 Adafruit Industries
9+
* Authors: Tony DiCola, Todd Treece, Morgan Winters
10+
* Licensed under the MIT license.
11+
*
12+
* All text above must be included in any redistribution.
13+
*/
14+
15+
#ifndef ADAFRUITIO_MKR1010_H
16+
#define ADAFRUITIO_MKR1010_H
17+
18+
#if defined(ARDUINO_SAMD_MKR1010)
19+
20+
#include "AdafruitIO.h"
21+
#include "Adafruit_MQTT.h"
22+
#include "Adafruit_MQTT_Client.h"
23+
#include "Arduino.h"
24+
#include "SPI.h"
25+
#include "WiFiNINA.h"
26+
#include "WiFiSSLClient.h"
27+
28+
class AdafruitIO_MKR1010 : public AdafruitIO {
29+
30+
public:
31+
AdafruitIO_MKR1010(const char *user, const char *key, const char *ssid,
32+
const char *pass);
33+
~AdafruitIO_MKR1010();
34+
35+
aio_status_t networkStatus();
36+
const char *connectionType();
37+
38+
protected:
39+
void _connect();
40+
void _disconnect();
41+
42+
const char *_ssid;
43+
const char *_pass;
44+
45+
WiFiSSLClient *_client;
46+
};
47+
48+
#endif // ARDUINO_ARCH_SAMD
49+
50+
#endif // ADAFRUITIO_MKR1010_H

0 commit comments

Comments
 (0)