Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 4, 2021 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/4925293041f1aa89092f31999f837b94 to your computer and use it in GitHub Desktop.
Save parzibyte/4925293041f1aa89092f31999f837b94 to your computer and use it in GitHub Desktop.
void loop()
{
if (MODO == MODO_LECTURA)
{
char contenidoRfid[LONGITUD_BYTES] = "";
bool lecturaExitosa = leer(contenidoRfid);
if (lecturaExitosa)
{
Serial.println("Lo que hay escrito es:");
Serial.println(contenidoRfid);
}
else
{
Serial.println("Error leyendo. Tal vez no hay RFID presente");
}
}
else if (MODO == MODO_ESCRITURA)
{
char mensaje[] = "parzibyte";
bool escrituraExitosa = escribir(mensaje);
if (escrituraExitosa)
{
Serial.println("Escrito ok");
}
else
{
Serial.println("Error escribiendo. Tal vez no hay RFID presente");
}
}
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment