Previously, in Chapter 5, Connecting Your Raspberry Pi to the Physical World, we used the i2cdetect command-line tool to check whether an I2C device was connected and to verify its I2C address. Check that your Raspberry Pi can see your OLED display by running the following in a Terminal:
$ i2cdetect -y 1
If your OLED is connected, you will see the following output, which tells us that the OLED was detected and has the hex address, 0x3C:
# ...truncated...
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
# ...truncated...
If your address is different, that's okay, we just need to adjust the address in code which we will do next.