Arduino Library for PLC like functions