Having trouble using SSD1306_128x32_i2c example in OLED

Hello,
I am trying to learn how to use Display with Arduino.
I am using OLED from Amazon and Arduino UNO.
I am using Arduino 2:1.0.5+dfsg2-4.1 IDE for Raspberry Pi with OS: Raspbian 10 buster & Kernel: armv7l Linux 5.10.11-v7+
I am using SSD1306, Adafruit GFX Library & Adafruit_BusIO.
For now I just want to see if the display works so I am using the Example ssd1306_128x32_i2c. When I try to verify the provied default example i am provided the errors below:

In file included from /home/pi/sketchbook/libraries/Adafruit_GFX/Adafruit_GrayOLED.cpp:20:0:
/home/pi/sketchbook/libraries/Adafruit_GFX/Adafruit_GrayOLED.h:30:32: fatal error: Adafruit_I2CDevice.h: No such file or directory
compilation terminated.

=======================================================================================

So I added the following header files from the BusIO
#include <Adafruit_I2CDevice.h>
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_SPIDevice.h>
#include <Adafruit_I2CRegister.h>

then I get these error

In file included from /home/pi/sketchbook/libraries/Adafruit_BusIO/Adafruit_BusIO_Register.h:2:0,
from ssd1306_128x32_i2c.ino:2:
/home/pi/sketchbook/libraries/Adafruit_BusIO/Adafruit_SPIDevice.h:86:3: error: ‘SPISettings’ does not name a type
SPISettings *_spiSetting;
^

I am confused as to why it using the SPI when I am using a I2C

Can anyone helpme to just test the display for this OLED. I just need it to display texts for now.

Update:
Seems that it was because I was using very old IDE.
manually installed the latest 1.8x version and it worked like a charm.
Funny thing that the Raspberry Pi Repository has such old version.
Well learned to always check that you have the latest software version from the approprite party.

This topic was automatically closed after 45 days. New replies are no longer allowed.