Updated Arduino code to handle locking and unlocking mechanism