RFID pin D4 & SD card

The RFID Lock Shield makes it easy to control an electric door strike using an Arduino and an RFID reader. (Note: obsolete, replaced by the RFID Door Lock Shield). [Product page]
Post Reply
spleipnir
Posts: 5
Joined: Wed Jul 04, 2012 1:21 pm

RFID pin D4 & SD card

Post by spleipnir » Wed Jul 04, 2012 1:38 pm

Hi everyone.

I have an RFID lock shield with an etherten, using an ID20 reader. I have loaded the sketch provided in the practical arduino and everything works fine.
I wanted to go further and use the SD card for storing the RFID input. The problem is that the lock shield and the SD card are using pin D4 and this is conflicting.
Any suggestions?

Thanks.

spleipnir
Posts: 5
Joined: Wed Jul 04, 2012 1:21 pm

Re: RFID pin D4 & SD card

Post by spleipnir » Sun May 19, 2013 6:44 am

Well, it's been a while since I've touched my Arduino.
Thanks to Tronixstuff, I have redirected pin 4 to pin 2 and I can now record RFID tag to the SD card.
My programing knowledge is very limited and I have managed to compile from the examples provided, a sketch that read RFID tags and log to the SD card with a time stamp from NTP in a text file (see attached sketch).
Nice but where I have problem is:
1- when I try to add the web server function in the loop section. Cause it would be good to check on the SD card log from time to time.
2 - how would you make for the log file to be dynamically named after the current date (yyyymmdd.txt)

I reckon after that, we would have a good working RFID solution for everyone.

Thanks all for you help.
Attachments
RFID_Lock_ntp_SD_sketch.txt
(10.45 KiB) Downloaded 336 times

spleipnir
Posts: 5
Joined: Wed Jul 04, 2012 1:21 pm

Re: RFID pin D4 & SD card

Post by spleipnir » Sun May 19, 2013 8:04 am

I need to add a correction.
The web server code I am trying to compile is from http://www.ladyada.net/learn/arduino/ethfiles.html (much better than the web server expemple).
I have also used the SdFatLib library there, for compatibility in my sketch from the preious post.

spleipnir
Posts: 5
Joined: Wed Jul 04, 2012 1:21 pm

Re: RFID pin D4 & SD card

Post by spleipnir » Mon May 20, 2013 12:29 am

Well, I do not get any errors when compiling. Just that I only get the web serving parts, with the card reading function not working.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest