Hi @Robert93820,
Does this mean a simple change in the code? Through redefining the digital pins?
Hi @Robert93820,
Does this mean a simple change in the code? Through redefining the digital pins?
Can you confirm that the library you added it from was version 3.8.1 - there are several versions of that download and some of them do not work properly.
That board doesn’t seem to have a SSD1306 example sketch. Can you please indicate where you the sketch you are testing with cam from (examples menu and sketch name, or download site).
Possibly. If you post the link to the adapter you are using and make it clear how you have connected everything together and let us know what example sketch you have uploaded it may be possible to determine whether changing the code is required.
The cable is a PiicoDev Cable 200mm here is the link to an image of the cable:
The sketch I have uploaded is an example sketch called: SSD1306_128x32_spi
There is an alternative example sketch called SSD1306_128x32_I2C
Here is an image of the connection between the pico and the picodev display
You have already posted a link to the cable - we know what that is.
The sketch SSD1306_128x32_spi will not work - it is for the SPI interface but you are using a I2C interface. I presume you found this under the ‘AdaFruitSSD1306’ menu item in the Examples menu. If you have a 32-line display use SSD1306_128x32_I2C. If you have a 64-line display use SSD1306_128x64_I2C. If you found it somewhere else then please use the AdaFruit one.
The image you have posted does not match the Pico W that I provided the link to and which you confirmed was the one you were using. I believe the image shows an adapter that the Pico W is plugged into. Please post a link to that adapter, or an image that enables it to be clearly identified. That will enable someone to determine exactly what you have connected the PiicoDev cable to, and whether or not any change to that sketch is required, or some different cabling might be necessary.
I have no idea. I personally try to stay clear of RPi. But from memory I think something like that is a solution. Or maybe connecting to another I2C port instead of that little connector and then redefining pins.
Cheers Bob
@Jeff105671,
thank you for the response
I did find the example in AdaFruitSSD1306 examples
The pi is plugged into a picodev expansion board, which allows it have ports and the i2c connection.
The picodev expansion board is the name of it
@Robert93820,
thanks for the suggestion I shall try it out by redefining the digital ports
Is it this one?
If it is that one then the inbuilt I2C connector is attached to GPIO 8 and 9. That should work for the Pico W as i2c0.
If you use the SSD1306_128x??_i2C sketch that matches your display size from the AdaFruit SSD1306 examples then you first need to adjust the display address to match your device. This is at the line #define SCREEN_ADDRESS 0x3D. If your address switch is off then this should be 3C, not 3D. You should probably confirm this using an I2C scanner. Then the things to try until it works are (in order):
Wire.setSDA(8);
Wire.setSCL(9);
immediately before the constructor for the display. That is, before line 36 in the 64-line example, or the line that starts Adafruit_SSD1306 display(…. That is the code that sets the GPIO pins for the Arduino wire library.
3. Insert the lines
bool setSDA(pin_size_t 8);
bool setSCL(pin_size_t 9);
at the same location as (2). That is the code that sets the GPIO pins for the Pico W board definition.
4. Both (2) and (3) in any order at the same place.