First of all, I am an electrical engineering student with very basic knowledge of C.So,half of the things you ask me Like the boolean thing and long with int return value. I have no idea about them.I have trying my best searching here and there and trying to write the code.
Servo has 3000 delay so that it wait 3 sec before closing it.
The parallel operation of the entry and exit gates works fine.
Regarding the bytes required for str(same no clue) and I know it is listing the busy slots because i wasnt able to write it the other way round.
I greatly appreciate that you are trying to help but you I am trying my best here too trying to somehow understand your suggestions and then implementing them.If I had strong programming skills I would have understood them and since I am running out of time and stuck at the very end of this project, I am in a bit of hurry.