Skip to content

Instantly share code, notes, and snippets.

Created February 19, 2020 00:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
No tengo idea, pero parece que está invertido y al escribir un HIGH
se apaga
void apagarLed()
digitalWrite(PIN_LED, HIGH);
void encenderLed()
digitalWrite(PIN_LED, LOW);
// 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)
if (longitudDeDatos <= 0)
char primerCaracter = (char)cargaUtil[0];
if (primerCaracter == '0')
else if (primerCaracter == '1')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment