Arduino and ESP8266

Hello all,

can i use an ESP8266 and an Arduino in the combination, that when one or two devices logged into the Wifi, then an Alarm System on the Arduino should be deactivated.

If no one of this devices is connect, then the Alarm System should be active.

Thanks