HTCC AB01 and external .96" OLED display

Using a Cubecell HTCC AB01 board (https://heltec.org/project/htcc-ab01/) I wonder if anyone know how to use an external I2C OLED 1306 128x64 display (photo).

I have connected such display which works fine with the factory installed sketch. No success when using libraries from RinkyDink or Adafruit.

Any help is appreciated!

download

Please use the I2C scanner code to check the I2C connection.
After you get the I2C address, please check your program with the correct address.
Also, this monitor does not have a reset pin, you should disable the reset pin by setting to -1.

hi,

maybe you can refer these code:

Thanks both for helping. When trying the examples mentioned by Jason next line generates the compiling error ‘GPO10’ was not declared in this scope:

SD1306Wire display(0x3c, 500000, I2C_NUM_0,GEOMETRY_128_64,GPIO10 ); // addr , freq , i2c group , resolution , rst

hi,

This code is designed for Ab02, so it can’t be compiled

please modified like this:
SSD1306Wire display(0x3c, 500000, I2C_NUM_0,GEOMETRY_128_64);

Great, thank you Jason.

hola mi nombre es RUDDY, estoy usando Cubecell HTCC AB01, tengo problemas en la conexión de pines a una pantalla I2C OLED de driver SH1106 y resolución 128x64, el programa que estoy utilizando como prueba es el ejemplo SH1107_SimpleDemo_I2C, allí no especifica las conexiones de los pines. el pin SDA de la pantalla lo conecte al pin de la placa SDA y el pin SCL de la pantalla a SCL de la placa y ni siquiera inicia la pantalla.
agradezco anticipadamente cualquier ayuda.
Adjunto el diagrama.


Adjunto el código de prueba que estoy utilizando.

hi,

I noticed you are using the VEXT supply the power.

Have you open the VEXT?
%E5%9B%BE%E7%89%87

Hola JasonXu, si estoy haciendo eso. lo he medido con un multímetro y le esta llegando alimentación de 3.3v.
el código que estoy usando es esta.

#include <Wire.h>
#include “cubecell_SH1107Wire.h”
#include “cubecell_OLEDDisplayUi.h”
#include “images.h”

SH1107Wire display(0x3c, 500000, I2C_NUM_0,GEOMETRY_128_64); // addr , freq , i2c group , resolution , rst
OLEDDisplayUi ui( &display );
void msOverlay(OLEDDisplay display, OLEDDisplayUiState state) {
display->setTextAlignment(TEXT_ALIGN_RIGHT);
display->setFont(ArialMT_Plain_10);
display->drawString(128, 0, String(millis()));
}
void drawFrame1(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
// draw an xbm image.
// Please note that everything that should be transitioned
// needs to be drawn relative to x and y
display->drawXbm(x + 34, y + 14, WiFi_Logo_width, WiFi_Logo_height, WiFi_Logo_bits);
}

void drawFrame2(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
// Demonstrates the 3 included default sizes. The fonts come from SSD1306Fonts.h file
// Besides the default fonts there will be a program to convert TrueType fonts into this format
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(ArialMT_Plain_10);
display->drawString(0 + x, 10 + y, “Arial 10”);
display->setFont(ArialMT_Plain_16);
display->drawString(0 + x, 20 + y, “Arial 16”);
display->setFont(ArialMT_Plain_24);
display->drawString(0 + x, 34 + y, “Arial 24”);
}

void drawFrame3(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
// Text alignment demo
display->setFont(ArialMT_Plain_10);
// The coordinates define the left starting point of the text
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->drawString(0 + x, 11 + y, “Left aligned (0,10)”);
// The coordinates define the center of the text
display->setTextAlignment(TEXT_ALIGN_CENTER);
display->drawString(64 + x, 22 + y, “Center aligned (64,22)”);
// The coordinates define the right end of the text
display->setTextAlignment(TEXT_ALIGN_RIGHT);
display->drawString(128 + x, 33 + y, “Right aligned (128,33)”);
}

void drawFrame4(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
// Demo for drawStringMaxWidth:
// with the third parameter you can define the width after which words will be wrapped.
// Currently only spaces and “-” are allowed for wrapping
display->setTextAlignment(TEXT_ALIGN_LEFT);
display->setFont(ArialMT_Plain_10);
display->drawStringMaxWidth(0 + x, 10 + y, 128, “Lorem ipsum\n dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore.”);
}

void drawFrame5(OLEDDisplay display, OLEDDisplayUiState state, int16_t x, int16_t y) {
}

void VextON(void)
{
pinMode(Vext,OUTPUT);
digitalWrite(Vext, LOW);
}

void VextOFF(void) //Vext default OFF
{
pinMode(Vext,OUTPUT);
digitalWrite(Vext, HIGH);
}

// This array keeps function pointers to all frames
// frames are the single views that slide in

FrameCallback frames[] = { drawFrame1, drawFrame2, drawFrame3, drawFrame4, drawFrame5 };

// how many frames are there?
int frameCount = 5;
// Overlays are statically drawn on top of a frame eg. a clock
OverlayCallback overlays[] = { msOverlay };
int overlaysCount = 1;

void setup() {
Serial.begin(115200);
Serial.println();
Serial.println();
VextON();
delay(100);
// The ESP is capable of rendering 60fps in 80Mhz mode
// but that won’t give you much time for anything else
// run it in 160Mhz mode or just set it to 30 fps
ui.setTargetFPS(60);
// Customize the active and inactive symbol

ui.setActiveSymbol(activeSymbol);
ui.setInactiveSymbol(inactiveSymbol);

// You can change this to
// TOP, LEFT, BOTTOM, RIGHT
ui.setIndicatorPosition(BOTTOM);

// Defines where the first frame is located in the bar.
ui.setIndicatorDirection(LEFT_RIGHT);
// You can change the transition that is used
// SLIDE_LEFT, SLIDE_RIGHT, SLIDE_UP, SLIDE_DOWN
ui.setFrameAnimation(SLIDE_LEFT);
// Add frames
ui.setFrames(frames, frameCount);

// Add overlays
ui.setOverlays(overlays, overlaysCount);
// Initialising the UI will init the display too.
ui.init();
}

void loop() {
int remainingTimeBudget = ui.update();
if (remainingTimeBudget > 0) {
// You can do some work here
// Don’t do stuff if you are below your
// time budget.
delay(remainingTimeBudget);
}
}

alguna aclaración estare muy agradecido.

could you tell me what your OLED type? inch, driver chip.

this code is for 0.91inch SH1107 OLED.

I guess your OLED is maybe the SSD1306.

muchas gracias por responder mi OLED es SH1106