I am new with using the ESP8266 and Adafruit. I am trying to connect the ESP8266 with my Adafruit account but it gives the error:
"Multiple libraries were found for "AdafruitIO_WiFi.h"
Used: /Users/steph/Documents/Arduino/libraries/Adafruit_IO_Arduino
In file included from /Users/Documents/Arduino/libraries/Adafruit_IO_Arduino/src/wifi/AdafruitIO_ESP8266.h:18:0,
Multiple libraries were found for "Adafruit_MQTT.h"
Used: /Users/steph/Documents/Arduino/libraries/Adafruit_MQTT_Library
from /UsersDocuments/Arduino/libraries/Adafruit_IO_Arduino/src/AdafruitIO_WiFi.h:37,
from sketch/config.h:32,
from /var/folders/t1/_yj81zy540g7hjbh3ws457nr0000gn/T/arduino_modified_sketch_762781/adafruitio_00_publish.ino:18:
/Users/Documents/Arduino/libraries/Adafruit_IO_Arduino/src/AdafruitIO.h:23:31: fatal error: ArduinoHttpClient.h: No such file or directory
#include "ArduinoHttpClient.h"
^
compilation terminated.
exit status 1
Error compiling for board WeMos D1 mini Pro."
I am not sure how to fix this problem or if there is a better way to do this, my final goal is to connect IFTTT to Adafruit and google home. I want to switch an LED on, first. Here is the final code from Adafruit:
"// Adafruit IO Publish Example
//
// Adafruit invests time and resources providing this open source code.
// Please support Adafruit and open source hardware by purchasing
// products from Adafruit!
//
// Written by Todd Treece for Adafruit Industries
// Copyright (c) 2016 Adafruit Industries
// Licensed under the MIT license.
//
// All text above must be included in any redistribution.
/************************** Configuration ***********************************/
// edit the config.h tab and enter your Adafruit IO credentials
// and any additional configuration needed for WiFi, cellular,
// or ethernet clients.
#include "config.h"
/************************ Example Starts Here *******************************/
// this int will hold the current count for our sketch
int count = 0;
// set up the 'counter' feed
AdafruitIO_Feed *counter = io.feed("counter");
void setup() {
// start the serial connection
Serial.begin(115200);
// wait for serial monitor to open
while(! Serial);
Serial.print("Connecting to Adafruit IO");
// connect to io.adafruit.com
io.connect();
// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}
// we are connected
Serial.println();
Serial.println(io.statusText());
}
void loop() {
// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
io.run();
// save count to the 'counter' feed on Adafruit IO
Serial.print("sending -> ");
Serial.println(count);
counter->save(count);
// increment the count by 1
count++;
// Adafruit IO is rate limited for publishing, so a delay is required in
// between feed->save events. In this example, we will wait three seconds
// (1000 milliseconds == 1 second) during each loop.
delay(3000);
}
"
Here is the second attached code in the second tab:
"/************************ Adafruit IO Config *******************************/
// visit io.adafruit.com if you need to create an account,
// or if you need your Adafruit IO key.
#define IO_USERNAME "your_username"
#define IO_KEY "your_key"
/******************************* WIFI **************************************/
// the AdafruitIO_WiFi client will work with the following boards:
// - HUZZAH ESP8266 Breakout -> Adafruit HUZZAH ESP8266 Breakout : ID 2471 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Feather HUZZAH ESP8266 -> Adafruit Feather HUZZAH with ESP8266 - Loose Headers : ID 2821 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Feather HUZZAH ESP32 -> Adafruit HUZZAH32 – ESP32 Feather Board : ID 3405 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Feather M0 WiFi -> Adafruit Feather M0 WiFi - ATSAMD21 + ATWINC1500 : ID 3010 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Feather WICED -> Adafruit WICED WiFi Feather - STM32F205 with Cypress WICED WiFi : ID 3056 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Adafruit PyPortal -> Adafruit PyPortal - CircuitPython Powered Internet Display : ID 4116 : $54.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Adafruit Metro M4 Express AirLift Lite -> Adafruit Metro M4 Express AirLift (WiFi) - Lite : ID 4000 : $34.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Adafruit AirLift Breakout -> Adafruit AirLift – ESP32 WiFi Co-Processor Breakout Board : ID 4201 : $9.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Adafruit AirLift Shield -> Adafruit AirLift Shield - ESP32 WiFi Co-Processor : ID 4285 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// - Adafruit AirLift FeatherWing -> Adafruit AirLift FeatherWing – ESP32 WiFi Co-Processor : ID 4264 : $12.95 : Adafruit Industries, Unique & fun DIY electronics and kits
#define WIFI_SSID "your_ssid"
#define WIFI_PASS "your_pass"
// uncomment the following line if you are using airlift
// #define USE_AIRLIFT
// uncomment the following line if you are using winc1500
// #define USE_WINC1500
// comment out the following lines if you are using fona or ethernet
#include "AdafruitIO_WiFi.h"
#if defined(USE_AIRLIFT) || defined(ADAFRUIT_METRO_M4_AIRLIFT_LITE)
// Configure the pins used for the ESP32 connection
#if !defined(SPIWIFI_SS) // if the wifi definition isnt in the board variant
// Don't change the names of these #define's! they match the variant ones
#define SPIWIFI SPI
#define SPIWIFI_SS 10 // Chip select pin
#define NINA_ACK 9 // a.k.a BUSY or READY pin
#define NINA_RESETN 6 // Reset pin
#define NINA_GPIO0 -1 // Not connected
#endif
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS, SPIWIFI_SS, NINA_ACK, NINA_RESETN, NINA_GPIO0, &SPIWIFI);
#else
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
#endif
/******************************* FONA **************************************/
// the AdafruitIO_FONA client will work with the following boards:
// - Feather 32u4 FONA -> Adafruit Feather 32u4 FONA : ID 3027 : $44.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// uncomment the following two lines for 32u4 FONA,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_FONA.h"
// AdafruitIO_FONA io(IO_USERNAME, IO_KEY);
/**************************** ETHERNET ************************************/
// the AdafruitIO_Ethernet client will work with the following boards:
// - Ethernet FeatherWing -> Adafruit Ethernet FeatherWing : ID 3201 : $19.95 : Adafruit Industries, Unique & fun DIY electronics and kits
// uncomment the following two lines for ethernet,
// and comment out the AdafruitIO_WiFi client in the WIFI section
// #include "AdafruitIO_Ethernet.h"
// AdafruitIO_Ethernet io(IO_USERNAME, IO_KEY);"
NB: These codes aren't written by me, they are written by Adafruit.
Please help