RFID reading implemented and changed function for switch