FRAM ESP32 Błąd kompilacji

Zibi
Posts: 646
Joined: Wed Jul 31, 2019 9:20 am
Location: Białogard

Post

Witam
Wydaję mi się że wszystko jest ok z programem. Wywala mi błąd kompilacji, a najdziwniejsze jest to, że 2 miesące temu kompilował się kod teraz wróciłem do temtu potrzebuje użyć fram i nie chcę zagadać.

Code: Select all

ESP32 DEV Module
BOARD MANAGER 2.0.3
Arduino 1.8.16
/*ESP32
  Arduino 1.8.16
  ESP32 BOARD MANAGER 2.0.3
*/

#include <SuplaDevice.h>
#include <supla/network/esp_wifi.h>
#include <supla/control/relay.h>
#include <supla/control/button.h>
#include <supla/storage/littlefs_config.h>
#include <supla/events.h>
#include <Arduino.h>
#include <supla/storage/fram_spi.h>
#include <supla/uptime.h>

Supla::Uptime mojeUptime;

// Choose where Supla should store roller shutter data in persistent memory
// We recommend to use external FRAM memory

//#include <supla/storage/eeprom.h>
//Supla::Eeprom eeprom;

#define SUPLA_STORAGE_OFFSET 0
#define FRAM_CS 15   // pin for FRAM CS

//Supla::FramSpi fram(FRAM_CS, SUPLA_STORAGE_OFFSET);
Supla::FramSpi fram(18, 19, 23, FRAM_CS, SUPLA_STORAGE_OFFSET); // <- sofrware spi, piny (SCK, MISO, MOSI, CS)


// ---------- Adress SUPLA SSID PASSWORD ---------------------------------------------------------------------------------------
const char* host = "svrx.supla.org";
const char* ssid = "xxxxxx";
const char* pass = "xxxxxx";

Supla::ESPWifi wifi(ssid, pass);

auto r1 = new Supla::Control::Relay(13, true); // Relay Lampka

  
  void setup() {

    Serial.begin(115200);

    //-----------------------------------------------------------------------------------------------------------------------------------------------
    // Replace the falowing GUID with value that you can retrieve from https://www.supla.org/arduino/get-guid
    char GUID[SUPLA_GUID_SIZE] = {0x8B,0x51,0x87,0xA9,0xBD,0xB0,0x9B,0x02,0x70,0xB6,0x11,0x72,0xBF,0xE0,0x83,0x80};

    // Replace the following AUTHKEY with value that you can retrieve from: https://www.supla.org/arduino/get-authkey
    char AUTHKEY[SUPLA_AUTHKEY_SIZE] = {0x2F,0xBD,0x67,0x34,0xE2,0x62,0xE3,0x07,0x90,0x9F,0x46,0x21,0x11,0x1A,0x6C,0xFB};

    r1->setDefaultStateRestore();  
    

    wifi.enableSSL(false);    // Wylaczenie SSL dzieki temu nastepuje mniejsze zuzycie pamieci RAM.
    SuplaDevice.begin(GUID,  //  Global Unique Identifier
                      host,  //  SUPLA server address
                      "xxxxxxxxxxxxx",   // Email address used to login to Supla Cloud
                      AUTHKEY);                        // Authorization key

    delay(1000);
  }

  void loop() {
    SuplaDevice.iterate();
    mojeUptime.iterate(millis());
    if (mojeUptime.getUptime() > 60*60) {
       ESP.restart();
    }
  }

Code: Select all

Arduino:1.8.16 (Windows 10), Płytka:"ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, Core 1, Core 1, None"

In file included from C:\Users\Lenovo\Desktop\fram_esp32\fram_esp32.ino:14:

D:\Arduino 1.8.16 AT Supla\arduino-ide-portable_1.8.16\arduino-1.8.16\libraries\supla-arduino-master\src/supla/storage/fram_spi.h:29:10: fatal error: Adafruit_FRAM_SPI.h: No such file or directory

 #include "Adafruit_FRAM_SPI.h"

Znaleziono wiele bibliotek w "WiFi.h"

          ^~~~~~~~~~~~~~~~~~~~~

Wykorzystane: C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WiFi

compilation terminated.

Niewykorzystane: D:\Arduino 1.8.16 AT Supla\arduino-ide-portable_1.8.16\arduino-1.8.16\libraries\WiFi

Znaleziono wiele bibliotek w "WiFiClientSecure.h"

Wykorzystane: C:\Users\Lenovo\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\WiFiClientSecure

Niewykorzystane: D:\Arduino 1.8.16 AT Supla\arduino-ide-portable_1.8.16\arduino-1.8.16\libraries\ESP8266WiFi

exit status 1

Błąd kompilacji dla płytki ESP32 Dev Module.



Ten raport powinien zawierać więcej informacji jeśli w 
File -> Preferencje zostanie włączona opcja "Pokaż
szczegółowe informacje podczas kompilacji"
User avatar
klew
Posts: 13909
Joined: Thu Jun 27, 2019 12:16 pm
Location: Wrocław
Has thanked: 135 times
Been thanked: 137 times

Post

Code: Select all

fatal error: Adafruit_FRAM_SPI.h: No such file or directory
Kompilator mówi, że nie może znaleźć biblioteki Adafruit FRAM SPI.
Najlepsze suple dla Twojego domu :mrgreen:
Zibi
Posts: 646
Joined: Wed Jul 31, 2019 9:20 am
Location: Białogard

Post

Dziwna sprawa biblioteke mam w folderze library a za grzyba nie może jej znaleźć :shock:

Edit
Znalazłem przyczynę nie wiem jak to się stało wyparowało mi Adafruti BusIO.

Return to “Arduino IDE”