NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

#include <SPI.h>
#include <MFRC522.h>
#include <EEPROM.h>
#define RST_PIN 9
#define SS_PIN 10byte readCard[4];
int successRead;MFRC522 mfrc522(SS_PIN, RST_PIN);
MFRC522::MIFARE_Key key;
void setup()
{ Serial.begin(9600);
SPI.begin(); mfrc522.PCD_Init();
Serial.println(“RFID KART KAYIT UYGULAMASI”);
Serial.println(“————————–“);
Serial.println(“Lutfen 1 numarali karti okutun”);
Serial.println();
do
{ //okuma başarılı olana kadar getID fonksiyonunu çağır successRead = getID(); } while (!successRead); for ( int i = 0; i < mfrc522.uid.size; i++ ) { //kartın UID’sini EEPROM’a kaydet EEPROM.write(i, readCard[i] ); } Serial.println(“Kart EEPROM’a kaydedildi.”); Serial.println(); Serial.println(“Lutfen 2 numarali karti okutun.”); Serial.println(); do { successRead = getID(); } while (!successRead); for ( int i = 0; i < mfrc522.uid.size; i++ ) { EEPROM.write(i + 4, readCard[i] ); } Serial.println(“Kart EEPROM’a kaydedildi.”); Serial.println(); Serial.println(“Kart kayit islemi basarili!”);}void loop(){}int getID() { //yeni bir kart okunmadıysa 0 döndür if ( ! mfrc522.PICC_IsNewCardPresent()) { return 0; } if ( ! mfrc522.PICC_ReadCardSerial()) { return 0; } Serial.print(“Kart UID’si: “); //kartın UID’sini byte byte oku ve seri monitöre yaz for (int i = 0; i < mfrc522.uid.size; i++) { // readCard[i] = mfrc522.uid.uidByte[i]; Serial.print(readCard[i], HEX); } Serial.println(“”); //kart okumayı durdur ve 1 döndür (okuma başarılı) mfrc522.PICC_HaltA(); return 1;}
#include <SPI.h>
#include <MFRC522.h>
#include <EEPROM.h>
#define RST_PIN 9
#define SS_PIN 10
#define ledPin 7MFRC522 mfrc522(SS_PIN, RST_PIN);
String lastRfid = “”;String kart1 = “”;
String kart2 = “”;MFRC522::MIFARE_Key key;
void setup()
{ Serial.begin(9600);
SPI.begin(); mfrc522.PCD_Init();
pinMode(ledPin, OUTPUT);
Serial.println(“RFID KART OKUMA UYGULAMASI”);
Serial.println(“————————–“);
Serial.println(); //EEPROM’dan kart bilgisini oku readEEPROM();}void loop(){ //yeni kart okununmadıkça devam etme if ( ! mfrc522.PICC_IsNewCardPresent()) { return; } if ( ! mfrc522.PICC_ReadCardSerial()) { return; } //kartın UID’sini oku, rfid isimli string’e kaydet String rfid = “”; for (byte i = 0; i < mfrc522.uid.size; i++) { rfid += mfrc522.uid.uidByte[i] < 0x10 ? ” 0″ : ” “; rfid += String(mfrc522.uid.uidByte[i], HEX); } //string’in boyutunu ayarla ve tamamını büyük harfe çevir rfid.trim(); rfid.toUpperCase(); if (rfid == lastRfid) return; lastRfid = rfid; Serial.print(“Kart 1: “); Serial.println(kart1); Serial.print(“Kart 2: “); Serial.println(kart2); Serial.print(“Okunan: “); Serial.println(rfid); Serial.println(); //1 nolu kart okunduysa LED’i yak, 2 nolu kart okunduysa LED’i söndür if (rfid == kart1) { digitalWrite(ledPin, HIGH); Serial.println(“LED yandi.”); } if (rfid == kart2) { digitalWrite(ledPin, LOW); Serial.println(“LED sondu.”); } Serial.println(); delay(200);}void readEEPROM(){ //EEPROM’dan ilk kartın UID’sini oku (ilk 4 byte) for (int i = 0 ; i < 4 ; i++) { kart1 += EEPROM.read(i) < 0x10 ? ” 0″ : ” “; kart1 += String(EEPROM.read(i), HEX); } //EEPROM’dan ikinci kartın UID’sini oku for (int i = 4 ; i < 8 ; i++) { kart2 += EEPROM.read(i) < 0x10 ? ” 0″ : ” “; kart2 += String(EEPROM.read(i), HEX); } //Okunan stringleri düzenle kart1.trim(); kart1.toUpperCase(); kart2.trim(); kart2.toUpperCase();}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.