Enviado em 09/06/2017 - 21:20h
Olá Gente Tudo Bem. Vim Aqui Desesperado Para Saber No Que Eu Errei.
#include <SPI.h>
#include <MFRC522.h>
#include <LiquidCrystal.h>
#define SS_PIN 10
#define RST_PIN 9
MFRC522 mfrc522(SS_PIN, RST_PIN);
LiquidCrystal lcd(8, 7, 5, 4, 3, 2);
char st[20];
void setup() {
Serial.begin(9600); // Inica a serial
SPI.begin(); // Inicia SPI bus
mfrc522.PCD_Init(); // Inicia MFRC552
Serial.println("APROXIME SEU CARTAO");
Serial.println();
//Define o número de colunas e linhas do LCD "ABAIXO"
lcd.begin(16, 2);
mensageminicial();
}
void mensageminicial() {
lcd.clear();
lcd.print(" APROXIME SEU ");
lcd.setCursor(0, 1);
lcd.print("CARTAO DO LEITOR");
}
void loop() {
if ( ! mfrc522.PICC_IsNewCardPresent())
{
return;
}
if ( ! mfrc522.PICC_ReadCardSerial())
{
return;
}
//Mostra UID na serial
Serial.print("UID DA TAG/CARTAO");
String conteudo = "";
byte letra;
for (byte i = 0; i < mfrc522.uid.size; 1++)
Serial.print (mfrc522.uid.uidByte[i] < 0x10 ? "0 " : " ");
Serial.print (mfrc522.uid.uidByte[i], HEX);
conteudo.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? "0 " : " "));
conteudo.concat(String(mfrc522.uid.uidByte[i], HEX));
}
Serial.println();
Serial.print("MENSAGEM - ");
conteudo.toUpperCase();
if (conteudo.substring(1) == "44 C7 50 1A") //UID 1 - TAG/CARTAO
{
Serial.println("OLA YURI ANTONIO");
Serial.println();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("OLA YURI");
lcd.setCursor(0, 1);
lcd.print("ACESSO LIBERADO");
delay(3000);
mensageminicial();
}
if (conteudo.substring(1) == "44 C7 50 1A") //UID 2 - TAG/CARTAO
{
Serial.println("CARTAO DESCONHECIDO");
Serial.println();
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" CARTAO ");
lcd.setCursor(0, 1);
lcd.print(" DESCONHECIDO ");
delay(5000);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(" ACESSO NEGADO ");
delay(3000);
mensageminicial();
}
O que é o THP na configuração de RAM do Linux e quando desabilitá-lo
Comparação entre os escalonadores BFQ e MQ-Deadline (acesso a disco) no Arch e Debian
Conciliando o uso da ZRAM e SWAP em disco na sua máquina
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Como unir duas coleções de ROMs preservando as versões traduzidas (sem duplicatas)
Como instalar o Telegram Desktop no Ubuntu 24.04
Overclocking Permanente para Drastic no Miyoo Mini Plus
Problemas de chaves (/usr/share/keyrings) no Debian
Converter os repositórios Debian para o novo formato com as chaves
eu preciso saber uma coisa sobre os games no linux (3)
eu preciso saber uma coisa sobre os games no linux (1)
Problema com audio apos upgrade (1)