Alternatives for ETH.h: []
ResolveLibrary(ETH.h)
-> candidates: []
In file included from c:\Users\Arduino\libraries\Bootstrapper\src\BootstrapManager.h:29,
from c:\Users\Arduino\libraries\Bootstrapper\src\BootstrapManager.cpp:20:
c:\Users\Arduino\libraries\Bootstrapper\src\Configuration.h:33:10: fatal error: ETH.h: No such file or directory #include <ETH.h>
^~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Are there any other libraries I could use, or do I need to switch to micropython?
// Libraries
#include <EspMQTTClient.h>
#include <ArduinoJson.h> // Import JSON functionality
#include <Arduino.h> // Import Arduino functionality
#include <Secrets.h> // Import data from secrets file
// Variables
const int HwLiftRelease = 2; // D2 digital output
const int HwLiftUp = 3; // D3 digital output
const int HwLiftDown = 4; // D4 digital output
const char WifiSsid[] = WIFI_SSID;
const char WifiPwd[] = WIFI_PWD;
const char MqttAdr[] = MQTT_ADR;
const short MqttPort = MQTT_PORT;
const char MqttUser[] = MQTT_USER;
const char MqttPwd[] = MQTT_PWD;
const char MqttClient[] = MQTT_CLIENT_ID;
const char MqttTopicWill[] = MQTT_TOPIC_WILL;
const char MqttTopicSub[] = MQTT_TOPIC_SUB;
const char MqttTopicPub[] = MQTT_TOPIC_PUB;
const char MqttMessageWill[] = MQTT_MESSAGE_WILL;
EspMQTTClient client(
WifiSsid,
WifiPwd,
MqttAdr, // MQTT Broker server ip
MqttUser, // Can be omitted if not needed
MqttPwd, // Can be omitted if not needed
MqttClient, // Client name that uniquely identify your device
MqttPort // The MQTT port, default to 1883. this line can be omitted
);
void setup()
{
Serial.begin(115200);
// Optional functionalities of EspMQTTClient
client.enableDebuggingMessages(); // Enable debugging messages sent to serial output
client.enableHTTPWebUpdater(); // Enable the web updater. User and password default to values of MQTTUsername and MQTTPassword. These can be overridded with enableHTTPWebUpdater("user", "password").
client.enableOTA(); // Enable OTA (Over The Air) updates. Password defaults to MQTTPassword. Port is the default OTA port. Can be overridden with enableOTA("password", port).
client.enableLastWillMessage(MqttTopicWill, MqttMessageWill); // You can activate the retain flag by setting the third parameter to true
}
// This function is called once everything is connected (Wifi and MQTT)
// WARNING : YOU MUST IMPLEMENT IT IF YOU USE EspMQTTClient
void onConnectionEstablished()
{
// Subscribe to topic and display received message to Serial
client.subscribe(MqttTopicSub, [](const String & payload) {
Serial.println(payload);
});
// Publish a message to topic
client.publish(MqttTopicPub, "Online"); // You can activate the retain flag by setting the third parameter to true
}
void loop()
{
client.loop();
}