replace ethernet2 with ethernet lib

This commit is contained in:
brentru 2019-04-15 15:07:22 -04:00
parent ac625aa89e
commit 0c0beb2b34
5 changed files with 6 additions and 6 deletions

View file

@ -21,5 +21,5 @@ script:
# build ESP8266 target
- build_platform esp8266
# build SAMD target
- arduino --install-library "WiFi101"
- arduino --install-library "WiFi101, Ethernet"
- build_platform zero

2
Jenkinsfile vendored
View file

@ -1,6 +1,6 @@
arduino {
verify = false
platforms = ["esp8266:esp8266", "esp32:esp32", "adafruit:avr", "arduino:samd", "adafruit:samd"]
libraries = ["Adafruit MQTT Library", "Adafruit FONA Library", "Ethernet2", "WiFi101"]
libraries = ["Adafruit MQTT Library", "Adafruit FONA Library", "Ethernet", "WiFi101"]
boards = ["ESP8266", "M0_WINC1500", "WICED", "MKR1000", "M0_ETHERNETWING", "FONA_32U4", "ESP32"]
}

View file

@ -60,6 +60,6 @@ Adafruit Ethernet FeatherWing
The Ethernet FeatherWing will also require a 32u4, M0, or ESP8266 based Feather. Any Arduino cores
required by the host Feather board will also be required.
* Latest version of the `Adafruit Ethernet2 Library <https://github.com/adafruit/Ethernet2>`_
* Latest version of the `Ethernet Library <https://github.com/arduino-libraries/Ethernet>`_
* Latest version of the `Adafruit MQTT Library <https://github.com/adafruit/Adafruit_MQTT_Library>`_
* Latest version of the `Arduino HTTP Client Library <https://github.com/arduino-libraries/ArduinoHttpClient>`_

View file

@ -1,5 +1,5 @@
name=Adafruit IO Arduino
version=2.7.23
version=2.7.3
author=Adafruit
maintainer=Adafruit <adafruitio@adafruit.com>
sentence=Arduino library to access Adafruit IO.

View file

@ -17,7 +17,7 @@
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
#include <Ethernet2.h>
#include <Ethernet.h>
#include <EthernetClient.h>
#include <Dns.h>
#include <Dhcp.h>
@ -31,7 +31,7 @@ class AdafruitIO_Ethernet : public AdafruitIO {
AdafruitIO_Ethernet(const char *user, const char *key):AdafruitIO(user, key)
{
_client = new EthernetClient();
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port);
_mqtt = new Adafruit_MQTT_Client(_client, _host, _mqtt_port, _username, _key);
_http = new HttpClient(*_client, _host, _http_port);
}