Replies: 4 comments 5 replies
-
I assume that the RP2040 doesn't support the pin remapping as used in your example. I suggest to start with SW emulated I2C first, to ensure that there are no hw bugs: |
Beta Was this translation helpful? Give feedback.
-
i don't quite understand your thoughts but i will try tomorrow with the constructor thanks for the quick feedback. from the hardware point of view i can't imagine that something is wrong because the rest of my design works now i want to output the sensor data to the display. |
Beta Was this translation helpful? Give feedback.
-
ok i have tried it now with the constructor unfortunately nothing happens here what exactly is the difference between software and hardware i2C. and do i understand correctly that i have connected the Rp2040 to 2 other Gpios is possibly a problem now? what exactly does the reset pin for the display mean correctly that is with me on Gpio 9 which i set to 1 via digitalWrite(9, HIGH); to switch on the display so i can then also read out my I2C address. #include <Arduino.h> #ifdef U8X8_HAVE_HW_SPI /* This is a page buffer example. // Please UNCOMMENT one of the contructor lines below //U8G2_SH1107_64X128_1_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE, 17, 16); // End of constructor list void setup(void) { u8g2.begin(); void loop(void) {
} while ( u8g2.nextPage() ); |
Beta Was this translation helpful? Give feedback.
-
I'm using u8x8 instead of u8g2, a RPi Pico and a similar display from Waveshare (SKU 18179) which uses SH1107. I had to the connect reset cable to an unused GPIO pin and set that as the reset pin in the constructor like Why all that should be necessary for a supposed I2C display that should use four cables, that I don't know, but hope this helps. |
Beta Was this translation helpful? Give feedback.
-
hello there, I would like to start by saying that I am a complete beginner. At best, if that is possible, I would like to display variables as numerical values, i.e. a voltage and current measurement with a display. For this I use a RP2040 with which I want to control the display of Waveshare ( https://www.waveshare.com/wiki/Pico-OLED-1.3#I2C ) via i2C. If I have understood the library correctly, this should be relatively simple. I have already tried the Hello world example but there was no feed back. In the code I used the following constructor: U8G2_SH1107_64X128_1_HW_I2C u8g2(U8G2_R0, U8X8_PIN_NONE, 17, 16);
16 17 for SDA and SCL because i built my whole pcb by my selfe so it probably can be possible that i have a hardware bug but i know i2C works and when i pull up with this code
pinMode(9,OUTPUT);//RESET
digitalWrite(9, LOW);
pinMode(7,OUTPUT);//Chipselect
digitalWrite(7, LOW);
digitalWrite(9, HIGH);
CS and Reset is correct so that i can read the i2C Adresses in the "NET" and i get the normal 0x03C (60dec) address aknowlage.
if i have forgotten any information that might be needed let me know i would be extremely grateful if someone could explain to me what is missing, could be missing or in principle can not work with the program.
Beta Was this translation helpful? Give feedback.
All reactions