WRITING THE RFID SOFTWARE WITH ARDUINO [ TUTORIAL LESSON 10]
Hello to everyone,
We're starting our 10th lesson.
Today we will learn how to use the RFID module with Arduino. I'll introduce the codes for the software
as usual. It's a reminder, I started Fritzing lessons with Arduino lessons, and I suggest you follow Fritzing lessons too. Let's start our lesson now.
Herkese merhaba,
Onuncu dersimize başlıyoruz.
Bugün sizlerle RFID modulünün Arduino ile kullanımını öğreneceğiz. Herzaman olduğu gibi yazılım için gereken kodları tanıtacağım.Kısa bir hatırlatma, Arduino dersleriyle birlikte Fritzing derslerime de başladım Fritzing derslerimi de takip etmenizi öneririm. Şimdi dersimize başlayalım.
RFID: Radyo frekanslı tanımlama şeklinde Türkçeleştirilirse; canlıları ya da nesneleri radyo dalgaları ile tanımlamak için kullanılan teknolojilere verilen genel isimdir. RFID üzerinde anten çipin tanım bilgisini okuyucuya iletilebilmesini sağlar. Okuyucu RFID etiketinden aldığı radyo dalgalarını dijital bilgiye dönüştürerek bilgisayar sistemine geçmesini sağlar ve bu da işe yarar bir hale gelir. Temas yada yakınlaşmayla kendini tanıtan nesneler için kullanılır kredi kartları gibi.
Şimdi kodlarımızı yazmaya başlayabiliriz...
1.AŞAMA
Öncelikle RFID kütüphanesini projemize dahil ederek başlıyoruz. ICSP pinleri kullanacağımız için SPI kütüphanesini de projemize dahil etmemiz gerekiyor.
#include <SPI.h>
#include <RFID.h>
2.AŞAMA
RFID file oluşturmamız gerekiyor. Hemen oluşturalım. Daha sonra sda ve reset pinlerinin parameterelerini gireceğim bunlarda 10 ve 5.
RFID lrt720(10, 5);
3.AŞAMA
Void setup kısmındayız. Bu aşamada verileri okumamız için seri başlangıç komutunu girerek başlıyoruz. RFID modülümüzü de başlatacağız.
Serial.begin(9600);
SPI.begin();
lrt720.init();
4.AŞAMA
Şimdi loop döngüsünü yazıyoruz. Tahmin edeceğiniz gibi if komutuyla başlayacağız. İlk dizede ki komutu yazdığımız da if komutu çalışacak ve RFID kartıma gelen verilerin nasıl okunacağını tanıtacağız.
{
if (lrt720.isCard()) {
if (lrt720.readCardSerial()) {
Serial.println("Kart Bulundu ID : ");
Serial.print(lrt720.serNum[0]);
Serial.print(" , ");
Serial.print(lrt720.serNum[1]);
Serial.print(" , ");
Serial.print(lrt720.serNum[2]);
Serial.print(" , ");
Serial.print(lrt720.serNum[3]);
Serial.print(" , ");
Serial.print(lrt720.serNum[4]);
Serial.println(" ");
}
}
lrt720.halt();
}
Yazılımımız burada son buldu. Loop döngüsü içerisinde ki serial komutlarını işaretleyemedim malesef. Aksaklığın ne olduğunu çözemedim ama sanırım kodlar anlaşılıyor. RFID modülümüz hazır UNO kartımızı devreye bağlayarak kart okutma işlemini gerçekleştirebiliriz. Şimdi sizlere yazılımın Arduino IDE üzerinde görünümünü ekliyorum.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Congratulations @sametceylan! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Hey @sametceylan I am @utopian-io. I have just upvoted you!
Achievements
Suggestions
Get Noticed!
Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by sametceylan from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP. Be sure to leave at least 50SP undelegated on your account.
This post has received a 0.26 % upvote from @drotto thanks to: @banjo.