SPI- why doesn't it work?

#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <Fonts/FreeSerif9pt7b.h>

#define SCREEN_WIDTH 128 // OLED display width, in pixels

#define SCREEN_HEIGHT 64 // OLED display height, in pixels

// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)

Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1);

void setup() {

  pinMode(13, OUTPUT);

    pinMode(2, OUTPUT);

 Serial.begin(9600,SERIAL_8N1);

 

  // SSD1306_SWITCHCAPVCC = generate display voltage from 3.3V internally

  if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3D)) { // Address 0x3D for 128x64

    Serial.println(F("SSD1306 allocation failed"));

    for(;;); // Don't proceed, loop forever

  }

}

// Show initial display buffer contents on the screen --

  // the library initializes this with an Adafruit splash screen.

  display.display();

  delay(2000); // Pause for 2 seconds

  // Draw a single pixel in white

  display.drawPixel(10, 10, SSD1306_WHITE);

  // Show the display buffer on the screen. You MUST call display() after

  // drawing commands to make them visible on screen!

  display.display();

  delay(2000);

void loop() {

   

  delay(2000);

digitalWrite(2,HIGH);

digitalWrite(13,HIGH);

  delay(400);

  digitalWrite(2,LOW);

  digitalWrite(13,LOW);

  delay(200);

  Serial.println("Hello world");

  display.clearDisplay();

  display.setTextSize(1);             // Normal 1:1 pixel scale

  display.setTextColor(SSD1306_WHITE);        // Draw white text

  display.setCursor(0,0);             // Start at top-left corner

  display.println(F("Hello, world!"));

 

}