I have a good working circuit working with a DHT22 and outputting text to a featherwing OLED 128x64, but I find the buttons too tiny and close together to be of much use. I decided to use a non-featherwing OLED 128x64 and wire in my own (larger and more spread apart) buttons, but cannot get the new OLED to work at all with the Huzzah.
Docs on the Huzzah indicate that you must use a pullup resistor on the SCL and SDA pins. I tried 2.2K ohm, and 10K ohm, (and also no resistors) none of which had any effect.
The I2C scanner detects the device at 0x3D (the address stamped on the OLED board).
I have tested the OLED board with an Arduino UNO and it works perfectly both from the header pins and from the STEMMA connector.
Other forum posts (viewtopic.php?f=47&t=88025) indicate that the pullup resistors are built into the featherwing, so it seems like that's the missing link here, but I can't seem to figure out what I'm doing wrong.
I'm using the ssd1306_128x64_i2c sketch. The comments at the beginning of the sketch indicate SCL, SDA, and RST are needed, but the documentation on the OLED board say that RST is not necessary on this version as it is built-in. I have tried with and without RST connected.
Here is my circuit.
Thanks in advance for any help/advice.
Huzzah ESP8266 with 128x64 OLED (not featherwing)
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
The Featherwing OLED and standalone OLEDs use slightly different libraries. Are you using the library from the OLED’s tutorial?
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
I have tried both with the SSD1306 libs and the SSH110X libs.
After swapping out the OLEDs and the origin libs not working (SSH110X) I created an entirely new circuit and removed everything other than the OLED (removed the battery and DHT22) and used the ssd1306_128x64_i2c example sketch.
I actually bought 2 of these OLEDs and have tried both of them and both of them work correctly when using the Arduino UNO. Seems like it has to be the pullup resistors are incorrect, but I used 2.2K and 10k ohm resistors for the SCL and SDA pins and neither of them worked.
By the way, the sketch I'm using with the Huzzah is the exact same one I'm using with the Arduino and the Arduino works and the Huzzah doesn't.
After swapping out the OLEDs and the origin libs not working (SSH110X) I created an entirely new circuit and removed everything other than the OLED (removed the battery and DHT22) and used the ssd1306_128x64_i2c example sketch.
I actually bought 2 of these OLEDs and have tried both of them and both of them work correctly when using the Arduino UNO. Seems like it has to be the pullup resistors are incorrect, but I used 2.2K and 10k ohm resistors for the SCL and SDA pins and neither of them worked.
By the way, the sketch I'm using with the Huzzah is the exact same one I'm using with the Arduino and the Arduino works and the Huzzah doesn't.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
The standalone OLED breakouts have built in pull-ups and level shifters, so I doubt that’s the problem.
Double-check the physical connections between your ESP8266 and the OLED. Let’s make sure those are sound.
Do you have access to an oscilloscope or logic analyzer? It would be useful to check thongs out at the signal level.
Double-check the physical connections between your ESP8266 and the OLED. Let’s make sure those are sound.
Do you have access to an oscilloscope or logic analyzer? It would be useful to check thongs out at the signal level.
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
Unfortunately, I don't have an oscillioscope or logic analyzer - just a voltmeter.
I have tried it both with the STEMMA connector and with a soldered on header on two separate OLEDs. Both of those connections work correctly when attached to the Arduino UNO, but not with the huzzah.
If the OLED has a pull-up resistor already attached then I guess I should remove the ones I added. I have tried it with and without the pullups and couldn't get it to work.
The green "on" light on the back of the OLED lights up when I apply power and the featherwing OLED works when connected to the same pins on the huzzah.
I also use the same wires to connect to the Arduino UNO, I just move the OLED wires from the huzzah to the UNO, plug in the USB cable and change the board and USB port and it works.
To check the connection I took the huzzah out of the breadboard and connected it directly to the OLED with a new set of wires and still no love.
I really appreciate your help trying to troubleshoot this.
I have a couple of LCDs. I'll try to hook one of them them up to the huzzah I2C pins and see if I can get anything to work on those I2C pins.
I have tried it both with the STEMMA connector and with a soldered on header on two separate OLEDs. Both of those connections work correctly when attached to the Arduino UNO, but not with the huzzah.
If the OLED has a pull-up resistor already attached then I guess I should remove the ones I added. I have tried it with and without the pullups and couldn't get it to work.
The green "on" light on the back of the OLED lights up when I apply power and the featherwing OLED works when connected to the same pins on the huzzah.
I also use the same wires to connect to the Arduino UNO, I just move the OLED wires from the huzzah to the UNO, plug in the USB cable and change the board and USB port and it works.
To check the connection I took the huzzah out of the breadboard and connected it directly to the OLED with a new set of wires and still no love.
I really appreciate your help trying to troubleshoot this.
I have a couple of LCDs. I'll try to hook one of them them up to the huzzah I2C pins and see if I can get anything to work on those I2C pins.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
Comparison tests with other devices are good evidence. We can be reasonably confident the wiring is good.
The next possible reason for problems would be timing. The OLEDs need a certain amount of time to boot properly, and we’ve seen problems related to that in the past. An ESP8266 is faster than an Uno, so that may be related.
Try adding about 250ms of delay before calling the OLED’s .begin() method. See if that has any effect.
The next possible reason for problems would be timing. The OLEDs need a certain amount of time to boot properly, and we’ve seen problems related to that in the past. An ESP8266 is faster than an Uno, so that may be related.
Try adding about 250ms of delay before calling the OLED’s .begin() method. See if that has any effect.
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
Okay, I'll try it and report back, thanks.
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
I added a 1000ms delay at the beginning of the setup() function and still no love.
- adafruit_support_mike
- Posts: 67446
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
I’m out of ideas.. let me check with the rest of the team.
- adafruit2
- Posts: 22144
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
ok first up, thats an SSD1306 and you should def not use anything else
can you post a screenshot of your Arduino Tools menu - just to make sure ya got the same settings we do - we'll try the same setup here as well
can you post a screenshot of your Arduino Tools menu - just to make sure ya got the same settings we do - we'll try the same setup here as well
- vhavard
- Posts: 20
- Joined: Mon May 16, 2022 5:25 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
I was just looking at the comments at the beginning of the sketch and noticed this: "#define OLED_RESET 4 // Reset pin # (or -1 if sharing Arduino reset pin)". The docs for the OLED state that no reset is needed because it's built into the board (and I'm not using an Arduino) so I never changed it, but I decided to try changing it to -1 instead of 4 and when I did it started working.
This kind of support makes me want to buy all my stuff from you guys vs some other supplier. Thanks a ton for walking through this with me.
This kind of support makes me want to buy all my stuff from you guys vs some other supplier. Thanks a ton for walking through this with me.
- adafruit2
- Posts: 22144
- Joined: Fri Mar 11, 2005 7:36 pm
Re: Huzzah ESP8266 with 128x64 OLED (not featherwing)
yep i was going to suggest that next! in fact, its confusing so we're updating the example... most folks are using QT connects these days!
https://github.com/adafruit/Adafruit_SSD1306/pull/243
https://github.com/adafruit/Adafruit_SSD1306/pull/243
Please be positive and constructive with your questions and comments.