Pagina 1 di 1

Problema su librerie

MessaggioInviato: 25 set 2017, 16:58
da papa10
Ho un problema sulle librerie sullo sketch sotto postato che non riesco a trovare ed installarle:le librerie sono Adafruit_feather.h e adafruit_aio.h
Codice: Seleziona tutto
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Adafruit_FeatherOLED.h>
#include <Adafruit_FeatherOLED_WiFi.h>
#include <Adafruit_Sensor.h>
#include <adafruit_feather.h>
#include <adafruit_mqtt.h>
#include <adafruit_aio.h>

#define WLAN_SSID                 "SSID"
#define WLAN_PASS                 "PASSWORD"

#define VBAT_ENABLED              1
#define VBAT_PIN                  PA1

#define SENSOR_TSL2561_ENABLED    0
#if SENSOR_TSL2561_ENABLED
  #include <Adafruit_TSL2561_U.h>
  bool _tslFound = false;
  Adafruit_TSL2561_Unified tsl = Adafruit_TSL2561_Unified(TSL2561_ADDR_FLOAT, 12345);
#endif

#define AIO_ENABLED               0
#define AIO_USERNAME              "...your AIO username (see https://accounts.adafruit.com)..."
#define AIO_KEY                   "...your AIO key..."

#define FEED_VBAT                 "vbat"
#define FEED_TSL2561_LUX          "lux"

AdafruitAIO                        aio(AIO_USERNAME, AIO_KEY);
AdafruitAIOFeedGauge<float>        feedVBAT(&aio, FEED_VBAT);
AdafruitAIOFeedGauge<float>        feedLUX (&aio, FEED_TSL2561_LUX);

Adafruit_FeatherOLED_WiFi  oled = Adafruit_FeatherOLED_WiFi();

/**************************************************************************/
/*!
    @brief  Connect to the AP
    @return Error code
*/
/**************************************************************************/
bool connectAP()
{   
  oled.refreshIcons();
  oled.clearMsgArea();
  oled.println("Connecting to ...");
  oled.println(WLAN_SSID);
  oled.display();

  // Attempt to connect to the AP
  if ( Feather.connect(WLAN_SSID, WLAN_PASS) )
  {
    int8_t rssi = Feather.RSSI();
    uint32_t ipAddress = Feather.localIP();
    oled.setConnected(true);
    oled.setRSSI(rssi);
    oled.setIPAddress(ipAddress);
    oled.refreshIcons();
    oled.clearMsgArea();
  }
  else
  {
    // Display the error message
    err_t err = Feather.errno();
    oled.setConnected(false);
    oled.refreshIcons();
    oled.clearMsgArea();
    oled.println("Connection Error:");
    switch (err)
    {
      case ERROR_WWD_ACCESS_POINT_NOT_FOUND:
        // SSID wasn't found when scanning for APs
        oled.println("Invalid SSID");
        break;
      case ERROR_WWD_INVALID_KEY:
        // Invalid SSID passkey
        oled.println("Invalid Password");
        break;
      default:
        // The most likely cause of errors at this point is that
        // you are just out of the device/AP operating range
        oled.print(Feather.errno());
        oled.print(":");
        oled.println(Feather.errstr());
        oled.refreshIcons(); // Refresh icons in case the text ran over
        break;
    }   
    oled.display();
    // Return false to indicate that we received an error (available in feather.errno)
    return false;
  }

  return true;
}     

Re: Problema su librerie

MessaggioInviato: 24 ott 2017, 1:46
da MassimoB
probabilmente non le hai incluse nel progetto

Re: Problema su librerie

MessaggioInviato: 24 ott 2017, 7:21
da papa10
Ho detto che non riesco a trovarle ,quindi come faccio ad installarle?

Re: Problema su librerie

MessaggioInviato: 3 nov 2017, 10:27
da Shides
Ciao,

hai seguito la guida fornita su Adafruit per aggiungere il supporto a board di terze parti sull'IDE Arduino?

Seguendo le istruzioni in questo tutorial (sono tre paginette) dovresti risolvere O_/
https://learn.adafruit.com/add-boards-a ... 4/overview

Re: Problema su librerie

MessaggioInviato: 3 nov 2017, 12:28
da papa10
grazie