I just found the answer under a post for scanner error 8. It works for scanner error 5. You need to reset the printer to factory settings by holding down both the down arrow and the OK buttons, turn the printer off. Then, still holding down both the down arrow and the OK buttons, turn on the printer and keep holding those buttons until the initialization screen begins.
I tried it and it worked!