Micro programmable logic controller (micro PLC)