This is my first experience with the ESP32 Qwiic Pro Mini. I successfully loaded and executed the “Blink” example from the Arduino IDE, so I think I have that setup working. However, the examples for the Qwiic OLED do not work. I subsequently loaded a small sketch I have that scans for active I2C addresses and it found none.
The OLED works successfully with other architectures (the arduino pro mini, for example).
Is there some sort of special initialization for I2C that I’m missing for this ESP32?
I had a look at the schematics and the advised software setup from the hookup file. Based on that I do not expect QWIIC to work.
The advice is to select the ‘ESP32 Dev Module’ for the board. That will use the ESP32-variant file. That variant file does NOT have Wire1 pins defined would needed for QWIIC (according to the schematics).
In the sketch, you have to do something like: (I have not tried… I do not have this board)
in setup() : Wire1.begin(15, 5); // sda = IOA15, scl = IO5 according to schematics
Then try to connect to QWIIC devices using Wire1.
There are remarks about the special functions of IO5 during power-up in the schematics, but not sure how this would impact I2C. Still, give it try.
I also looks like some other pins are not correctly defined either (like the SPI)
Click on the sketch: I2C_Scanner. In that example Wire-pins are reassigned, instead of Wire1. BTW there are 2 other examples there as well for HardwareTest and Bluetooth.
I rather use Wire1 for QWIIC as a 3v3 I2C and continue to use Wire for the pins 22/21 as a 5V I2C.
But now looking at SPI, an example should have been provided on how to use the right pins with SPI.begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss) as the defaults in the ESP32-variant file can not be used :
pin ESP32-variant DEV-23386
5 CS/SS SCL
23 MOSI Not connected
19 MISO 19
18 SCK Not Connected
Once again, thanks very much. These examples may be useful in the future.
Obviously someone at Sparkfun knew that this was necessary. For me, I learned that Wire.begin and SPI.begin can take arguments. I guess this is board dependent? These arguments aren’t described in the main Arduino reference page.
So not only thanks for getting SparkFun’s product to work, but also for new knowledge.