SparkFun Forums 

Where electronics enthusiasts find answers.

User avatar
By GaryT
#208583
I have my Sparkfun Single Channel Gateway working but I want to add an I2C OLED to it. So far I can't get it working. In the ESP-sc-gway sketch under the OLED.h tab the pin numbers for SDA and SCL need to be defined. The layout of the pins on the board schematic does not show the actual pin numbers. I can get the sketch to compile with SDA Pin 2 and SCL Pin 3 but the OLED doesn't come on. Can anyone tell me what the pin numbers should be ? Or how I can get the OLED to work ?
User avatar
By TS-Mark
#208647
Hi Gary,

The I2C pins on the ESP32 LoRa Gateway are IO21 (SDA) and IO22 (SCL). Try setting those in the Wire.begin(); function and it should work.
User avatar
By GaryT
#208652
Thanks Mark, I tried those Pin numbers and the I2C OLED worked right away ! Ended a lot of fruitless trial and error. Suggestion: If the Schematic of the One Channel Gateway Board I/O Pins was updated to include those pin numbers opposite the SDA and SCL takeoffs it would be very helpful for beginners like myself. (now only identified on the schematic as 1 and 2). GaryT