Allora, ho utilizzato questa libreria.
Con questo schetch:
#include <Ethernet2.h>
#include <SPI.h>
#include <TelegramBot.h>
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
};
IPAddress ip(192, 168, 1, 3);
EthernetClient client;
const char* BotToken = "277407665:AAEJ80p5nDkXF9FVbAmfEN9GgjhrpeM0pPs"; // your Bot Teken
const char* BotName = "lollo_0_bot"; // your Bot Name
const char* BotUsername = "lollo_0_bot"; // your Bot User Name
TelegramBot bot(BotToken, BotName, BotUsername, client);
const int ledPin = 6; // the number of the LED pin
void setup()
{
Serial.begin(9600);
Ethernet.begin(mac, ip);
pinMode(ledPin, OUTPUT);
Serial.println(Ethernet.localIP());
Serial.println("Leggo nuovi messaggi...");
bot.begin(); //si blocca qua
Serial.println("Funzia");
}
void loop()
{
}
Lo schetch funziona bene fino a bot.begin() dopo si blocca.
E mi da questo errore: ATTENZIONE: la libreria TelegramBot-Library-master dichiara di funzionare sulle architetture [samd] e potrebbe non essere compatibile con la tua scheda che utilizza l'architettura [avr]
Come posso risolvere, ci sono altre librerie del tipo?
Utilizzo una scheda Arduino Uno e l'ethernet shield 2 (che funziona bene)
Grazie