funcion de Arduino IDE para ESP32S3 que manda un mqtt por SIM7080G usando las librerias tinyGSm y PubSubClient requiere el topic y el mensaje setup y funciones
#include <PubSubClient.h> #include <Arduino.h> #include <TinyGsmClient.h> #define MODEM_RST -1 #define MODEM_PWKEY 5 #define MODEM_POWER_ON 4 #define MODEM_TX 23 #define MODEM_RX 22 #define MODEM_BAUD 9600 #define APN "internet.itelcel.com" #define USERNAME "" #define PASSWORD "" #define TOPIC "Topic" #define PAYLOAD "Hola" //conectividad TinyGsm modem(Serial2); TinyGsmClient client(modem); PubSubClient mqtt(client); char mqttServer[] = "mqtt.thingspeak.com"; char mqttPort[] = "1883"; void setup() { // put your setup code here, to run once: pinMode(MODEM_PW