I found the problem. One of the wires that conect the arduino to the oled was broken...is the only explanation to the problem. I replaced all the wires and everything works perfectly!!
Thank you very much for your help and sorry for all the story

Best regards
Diogo