A PLC is an industrial grade Programmable Logic Controller, which is essentially a general purpose computer (such as a Raspberry Pi) connected to a set of relays or switches (usually solid state relays to give real-time response times), and programmed with a simple to use computer language (such as Java).
Here, in this series of blog posts, I'll show you how to architect your own IoT Industrial PLCs to control your assembly line, factory floor, or warehouse. Or, your Christmas lights if you don't have any of those. :-)
Start with this part, which you can get on Amazon:
PLCs are the way to go if you want fast responding, real-time control of equipment. And, remember to use Java to keep it fast while having a full-featured IoT programming language.