ramapcsx2 / gbs-control

GNU General Public License v3.0
773 stars 110 forks source link

Remapping GPIO pins not working #434

Open Hercules187 opened 1 year ago

Hercules187 commented 1 year ago

Hi all,

I did post this on the shmups thread but its been a week and my post has still not been moderated, I am trying to remap the SDA and SCL lines, I have tried adding the following lines:

#define  SCL = D4
#define SDA = D5

But the pins are still on the original settings, I tried used an iteger that represents the GPIO port number but still the same, what am I doing wrong?

Thanks

Steve

ramapcsx2 commented 1 year ago

Hey, is it even possible to freely pick any pin for the I2C? You may find this in the ESP8266 documentation.

Hercules187 commented 1 year ago

I believe so they are done in software so as long as they aren't hard mapped to something it should be possible...oh and someone in the shmups thread did it as he used one of the cut down version ESP32's not the full dev boards with all the GPIOS exposed.

Valnesh commented 1 year ago

Changing the pins in this line SSD1306Wire display(0x3c, D2, D1); //inits I2C address & pins for OLED and adding the pins to this one Wire.begin(); worked for me.

For example: SSD1306Wire display(0x3c, 5, 4); //inits I2C address & pins for OLED Wire.begin(5, 4);

Hercules187 commented 1 year ago

thanks for that Valneshok, I'm not sure I tried updating the wire display but I tried the wire.begins previously as you mentioned it didn't seem to work maybe that was why. The other problem may be that im using gpio2 txd01 and that seems to double the serial output txd0 apparently so I may need to turn off the serial console.