RFID door lock project

Hardware | Software

The software is run on a standard raspian image. The main code is 
written in php which runs at startup. 

The main file is daemon.php
This file runs in a loop chekcing for input and acting accordingly

There are also a number of files called via ajax, and a web interface

To use the raspberry pi UART, a couple of changes have to be made to 
default config files, since otherwise the pi uses it as a serial 

1)	Remove any references to /dev/ttyAMA0 from /boot/cmdline.txt
2)	Comment out the line: T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 from /etc/inittab

Also, the serial timeout for the UART must be changed from 0ms. This can 
be put into rc.local along with the startup command for daemon.php:

stty -F /dev/ttyAMA0 -icanon min 0 time 10

Finally, the code requires a database. It is assumed database is mySql and has a login of root/raspberrypi, but both of these 
things could easily be changed

The SQL fort the dataase structure is given here
All files can be downloaded here:

Web management pages