Created
February 18, 2020 20:44
-
-
Save parzibyte/dd1007570357a070be7d3971c4bf16f4 to your computer and use it in GitHub Desktop.
This file contains 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
// La función que será llamada cuando se reciba un | |
// mensaje en el tópico al que nos vamos a suscribir | |
void callback(char *topico, byte *cargaUtil, unsigned int longitudDeDatos) | |
{ | |
Serial.print("Se ha recibido un mensaje en: "); | |
Serial.println(topico); | |
Serial.print("Contenido: "); | |
for (unsigned int i = 0; i < longitudDeDatos; i++) | |
{ | |
Serial.print((char)cargaUtil[i]); | |
} | |
Serial.println(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment