#include <nvs_flash.h>
#include <Preferences.h>//Flash memory library
Preferences preferences_object;
int abc=preferences_object.getInt("baglantituru", 1); //I need to call the variable in the flash memory of the ESP32, if this variable is 1, the ethernet card will be activated, if it is 2, wifi will be activated.
#if abc==2
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
#else
#include <SPI.h>
#include <Ethernet2.h>
#include <BlynkSimpleEthernet2.h>
#endif
According to the value of the variable written in the ESP32 flash memory, wifi or ethernet should be active on the card, but I could not run the #if statement except for #define. I keep getting errors. Is there a method to do this? Thanks.....