Code hangs with SPI, and OLED labraries (Possible conflict between Adafruit SSD1306 and hardware SPI libraries)
I used the same code provided by you and uploaded it in the arduino uno and it was working fine for me. I am attaching the image for reference. I guess there might be some other issue