Cos'è ElectroYou | Login Iscriviti

ElectroYou - la comunità dei professionisti del mondo elettrico

Problema su librerie

Progetti, interfacciamento, discussioni varie su questa piattaforma.

Moderatori: Foto UtenteWALTERmwp, Foto Utentexyz

0
voti

[1] Problema su librerie

Messaggioda Foto Utentepapa10 » 25 set 2017, 16:58

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;
}     
Ultima modifica di Foto Utentewall87 il 25 set 2017, 16:59, modificato 1 volta in totale.
Motivazione: Titolo in minuscolo
Avatar utente
Foto Utentepapa10
71 1 3 4
Frequentatore
Frequentatore
 
Messaggi: 248
Iscritto il: 20 ott 2011, 17:11

0
voti

[2] Re: Problema su librerie

Messaggioda Foto UtenteMassimoB » 24 ott 2017, 1:46

probabilmente non le hai incluse nel progetto
MCSA Windows Server 2012 R2
Cisco CCNA R&S - Cisco CCNA Security - Cisco CCNA Cyber Ops
CompTia A+ - CompTia Linux+ - CompTIA Systems Support Specialist CSSS
CompTia Pentest+ LPIC-1 - VCP VMware - Cisco CCNP Enterprise
Avatar utente
Foto UtenteMassimoB
14,2k 6 12 13
Expert free
 
Messaggi: 3163
Iscritto il: 28 ott 2012, 9:56
Località: Milano

0
voti

[3] Re: Problema su librerie

Messaggioda Foto Utentepapa10 » 24 ott 2017, 7:21

Ho detto che non riesco a trovarle ,quindi come faccio ad installarle?
Avatar utente
Foto Utentepapa10
71 1 3 4
Frequentatore
Frequentatore
 
Messaggi: 248
Iscritto il: 20 ott 2011, 17:11

0
voti

[4] Re: Problema su librerie

Messaggioda Foto UtenteShides » 3 nov 2017, 10:27

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
Avatar utente
Foto UtenteShides
0 1
 
Messaggi: 2
Iscritto il: 19 ott 2017, 10:20
Località: Milazzp - Catania

0
voti

[5] Re: Problema su librerie

Messaggioda Foto Utentepapa10 » 3 nov 2017, 12:28

grazie
Avatar utente
Foto Utentepapa10
71 1 3 4
Frequentatore
Frequentatore
 
Messaggi: 248
Iscritto il: 20 ott 2011, 17:11


Torna a Arduino

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite