Is the problem in the code or in the OLED screen?

I suggest you look at one of the examples provided in your OLED driver. Get the OLED working, then address the remainder of you project code.