greiman/SSD1306Ascii

Is there any function that returns data from the display? (to verify the display is somewhat functional in init)

JonRobert opened this issue · 2 comments

Does the display controller return any data or indication that it is functioning? I realize in most cases you can just look at the display, however I'm considering the design of a remote device that will be subject to power outages. I would like to know if the OLED at least thinks its working.

BTW I've been using your SSD1306 library and have been very happy with it. I really appreciate the basic premise of compactness.

John

The SSD1306 is a write only device. You can see if it responds to the following sequence if you are using a Wire device.

Here is the test:

#include "Wire.h"
// 0X3C+SA0 - 0x3C or 0x3D
#define I2C_ADDRESS 0x3C

bool hasDevice(uint8_t i2cAdd) {
  Wire.beginTransmission(i2cAdd);
  return Wire.endTransmission() == 0;
}

void setup() {
  Serial.begin(9600);
  Wire.begin();
  if (hasDevice(I2C_ADDRESS)) {
    Serial.println("has device");
  } else {
    Serial.println("no device");
  }
}
void loop() {}

It doesn't give much information. I have modules that pass this test but don't display anything.