Problem with Xenon + Featherwing OLED

Hi - posting in case anyone has came across a similar issue.

I have been trying to set up a small Featherwing OLED on a Featherwing Doubler with a Xenon running Device OS 1.1.0… but am having a strange issue.

I am using oled-wing-adafruit library (which requires Adafruit_SSD1306, Adafruit-GFX-Library & Debounce) and my Particle Workbench Project looks like follows.

04

My code does the following, just to get some text output to OLED:

#include "Particle.h"
#include "oled-wing-adafruit.h"

OledWingAdafruit display;

void setup()
{
    Serial.begin(115200);

    display.setup();
	display.clearDisplay();
    display.setTextSize(1);
    display.setTextColor(WHITE);
    display.setCursor(0,0);
    display.println("Hello, world!");
	display.display();

}
 
void loop() 
{
    display.loop();

	if (display.pressedA()) 
    {
        Serial.println("Button A Pressed");
		display.clearDisplay();
		display.setTextSize(1);
		display.setTextColor(WHITE);
		display.setCursor(0,0);
		display.println("In loop!");
		display.display();
	}
}

When I flash and run, I get the following output to the screen:

Note, when I don’t write any text, just clear the display, I still get the dots at the bottom.

I know the screen works as I can use it with a Feather M0 I have sitting here. On the M0, I bypass using the oled-wing-adafruit library and use Adafruit_SSD1306 directly. I tried doing this on the Xenon but got the same result as seen in the photo so it must be something underlying.

Anyone witnessed similar behaviour?

I noticed this issue re: I2C issue on the nrf52840, but its not particle related, just sounded like a similar symptom.

Any help appreciated!

Have you by any chance ever had this Xenon set to use the Particle EtherWing?
If so, some sticky settings may still be there that cause/contribute to this behaviour.

When trying with M0, did you also use the same FeatherWing Doubler?

Hey @ScruffR - thanks for the reply.

I have not used the EtherWing no - this was a just unboxed Xenon about 20 mins before the photo above.

When trying with M0, did you also use the same FeatherWing Doubler?

Yeah - same doubler.

What are the wires coming out from the board connected to?

I have a similar setup working fine but I used the following libraries, have you tried these versions?

#include <Adafruit_GFX_RK.h>
#include <Adafruit_SSD1306_RK.h>
1 Like

Hey @armor - the wires are currently un-used and connected to nothing - they will be connected to some sensors and buttons eventually but are on pins separate to those used by the OLED.

I haven’t noticed the libs you mention - but see they are particle ports of the libs I am using so I will fire them in tonight and see if it improves the sitch.

What device OS are you using?

OS 1.1.0 - the libraries work on 0.9.0 as well.

1 Like

The official Adafruit SSD1306 library defines the display dimensions at compile time, which is a problem because you’d need to have a different library for each display dimension.

The Adafruit_SSD1306_RK library takes the display dimensions at runtime, allowing for different size and aspect ratio displays. I’m surprised the code compiled with the Adafruit library.

Normally you’d just include the oled-wing-adafruit library and it would include appropriate SSD1306 and GFX libraries automatically.

1 Like

Normally you’d just include the oled-wing-adafruit library and it would include appropriate SSD1306 and GFX libraries automatically.

Yeah @rickkas7 I am just migrating to workbench from using my own hooks into the local makefiles so I am too used to putting it all together myself :smiley:

Thank you all, works perfectly.

Thanks for the port @rickkas7