Generation

generate functionMon, 10 Apr 2023

funcion de Arduino IDE que manda un mqtt por SIM7080G requeire el topic y el mensaje

#include <Arduino.h> #include <SIM7080G.h> #include <WiFi.h> //Include the Wi-Fi library #include <PubSubClient.h> #include <string.h> char ssid[] = "my_wifi_name"; char pass[] = "my_wifi_pass"; char server[] = "mqtt.thingspeak.com"; char topic[] = "channels/948297/publish/"; char clientID[] = "clientID"; char key[] = "A1DG0I9XWENHRXJL"; char mensaje[] = "field1=10&field2=20"; WiFiClient espClient; PubSubClient client(espClient); #define PIN_SIM_PWR_ON 34 #define PIN_SIM_RESET 35 #define PIN_SOCKET_TX 27 #define PIN_SOCKET_RX 26

Want to kickstart your project?Use the new AI Studio to create your code