Sometimes "better" is not better

My current project is a system to interface with an electric gates control box. I got it working but it was using 4 webservers! 2 Arduino ones, and 2 Linux ones (a QNAP NAS and an OrangePi PC).

The first Arduino intercepted Wiegand signals from a keypad and transmitted them along an Ethernet cable to the QNAP which checked in a database to see if the code was valid and it then sent a signal to the 2nd Arduino which operated relays to trigger the gate opening electronics (OEM). I brought the Pi into service because I wanted a mobile web interface using a Proxy server, which for some reason the QNAP wouldn't support.

My bright idea was to replace the lot with a single Raspberry Pi, which could not only handle the database and logging functions, but also interface directly with relays/temperature sensors. As an interim step, I've wired the Pi directly to the relays, and ported the interface to it, so I'm now only using the original Arduino/Wiegand and the Pi.

But the problems I've had!! Despite libraries being available to enable one to write C code in a similar fashion to the Arduino IDE (WiringPi), one has to contend with user privileges and system latency. Having everything on one server now means that I've faced database locking issues and using command line compiling/Makefiles...

It's given me a new respect for the rugged little Arduino :smiley: