Comments on: Raspberry Pi Pico: SSD1306 OLED Display (Arduino IDE) https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Sun, 09 Feb 2025 09:38:09 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-1006542 Sun, 09 Feb 2025 09:38:09 +0000 https://randomnerdtutorials.com/?p=132767#comment-1006542 In reply to David.

Hi.
You can use other combination of pins, but you need to choose certain combinations.
See this section about I2C in our pinout guide: https://randomnerdtutorials.com/raspberry-pi-pico-w-pinout-gpios/#i2c

After choosing the pins:

In the setup(), you need to start an I2C communication using GPIO x and GPIO y. So, you need to add the following line:

Wire.begin(x, y);

After that, initialize the display with the following parameters:

if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C, false, false)) {
The parameters set as false ensure that the library doesn’t use the default I2C pins and use the pins defined in the code.

I think this should work but I haven’t tested it.

Regards,
Sara

]]>
By: David https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-1005842 Thu, 06 Feb 2025 17:47:23 +0000 https://randomnerdtutorials.com/?p=132767#comment-1005842 The pico has lots of i2c ports is there any way to specify the sclk and sda pins rather than use the default? I want to use pins 11 and 12

]]>
By: Sara Santos https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-938509 Wed, 17 Jul 2024 15:40:34 +0000 https://randomnerdtutorials.com/?p=132767#comment-938509 In reply to Rijk Meurs.

Hi.
What do you mean?
Regards,
Sara

]]>
By: Rijk Meurs https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-936210 Thu, 11 Jul 2024 06:30:46 +0000 https://randomnerdtutorials.com/?p=132767#comment-936210 Hi

is it possible to change the default I2C adress of the pico?

thank you

]]>
By: Sara Santos https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-907045 Wed, 17 Apr 2024 22:09:10 +0000 https://randomnerdtutorials.com/?p=132767#comment-907045 In reply to Bert.

Great.
I’m glad everything is working as expected.
Regards,
Sara

]]>
By: Bert https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-907035 Wed, 17 Apr 2024 21:12:03 +0000 https://randomnerdtutorials.com/?p=132767#comment-907035 In reply to Sara Santos.

Thank you for your response. I did the entire installation procedure again. When installing the boards I was immediately given an update option. After doing this, all programs worked as before and the error messages disappeared.
I have no idea what went wrong before, but it works again./
Thank you for your patience.

]]>
By: Sara Santos https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-906937 Wed, 17 Apr 2024 14:11:07 +0000 https://randomnerdtutorials.com/?p=132767#comment-906937 In reply to Bert.

Weird….
I’m not sure what might be causing the issue.
You said it worked before… I really don’t know what might have caused the issue…

Regards,
Sara

]]>
By: Bert https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-906791 Wed, 17 Apr 2024 10:08:49 +0000 https://randomnerdtutorials.com/?p=132767#comment-906791 In reply to Sara Santos.

I installed the pico according to https://randomnerdtutorials.com/programming-raspberry-pi-pico-w-arduino-ide/ After that everything worked fine. . Also the OLED sketch. But now that I want to soak it again, I received the aforementioned error message. I haven’t changed anything in settings, etc.

]]>
By: Sara Santos https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-906774 Wed, 17 Apr 2024 08:39:06 +0000 https://randomnerdtutorials.com/?p=132767#comment-906774 In reply to Bert.

Hi.
Did you install the Raspberry Pi Pico on the Arduino IDE?
Which version of the pico boards do you have installed?

Regards,
Sara

]]>
By: Bert https://randomnerdtutorials.com/raspberry-pi-pico-ssd1306-oled-arduino/#comment-906478 Tue, 16 Apr 2024 17:40:28 +0000 https://randomnerdtutorials.com/?p=132767#comment-906478 Hello Sarah.
I used the basic sketch, but I get an error message with the PICO and I don’t know what I can do about it?

C:\Users\dell\Documents\Arduino\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp:42:10: fatal error: pgmspace.h: No such file or directory
#include <pgmspace.h>
^~~~~~~~~~~~

Can you help me ?

]]>