Last active
February 18, 2020 20:41
-
-
Save parzibyte/12cd90dab2ad50300128cff173eef460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NOMBRE_RED "NOMBRE_RED" | |
#define PASSWORD_RED "TU_CONTRASEÑA" | |
#define DIRECCION_SERVIDOR_MQTT "1.2.3.4" | |
#define PUERTO_SERVIDOR_MQTT 1883 | |
#define USUARIO_MQTT "" // En mi caso es vacío | |
#define PASSWORD_MQTT "" // En mi caso es vacío | |
#define TIEMPO_ESPERA 3000 // Cada cuánto enviar el mensaje | |
int ultimaVez = millis(); // Para enviar cada X segundos pero sin usar delay | |
WiFiClient clienteWiFi; | |
PubSubClient clienteMqtt(clienteWiFi); | |
// El mensaje que se envía al servidor. Debe ser lo suficientemente | |
// grande | |
char mensaje[500] = ""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment