Heltec display trouble

i cannot get heltec esp32 v3.2 to display anything with an outside sketch. Mesh works ok. Is there a sketch to show how to get the display to work

If you’re using the Arduino IDE:

File > Examples > HeltecExample > FactoryTest > WiFi_LoRa_32_V3_FactoryTest

An important thing to note is that the v3.2 uses inverted logic on the backlight (through Vext) compared to the normal v3 and v3.1.

does anyone have a working sketch that will show the display works on heltec lora32 v3 v3.2. I cannot get anything to work. the display works fine when i flash Meshtastic

No point asking for the same thing again until you tell us why @UniquePete’s suggestion doesn’t work …

after some time i have been working with Grok to solve the problem of haveing the heltec lora 32 v3.2 to write to display without meshtastic. I have a bmp280 sensor outputing to display the temp and pressure in F and "hg. The display is on one i2c bus and the sensor on the other. we will be adding a 0-3.3v anamometer using adc on the sensor bus. Amazing having the resource that Chat and Grok can supply but you still need to help them once and a while. Heres the sketch
#include <Wire.h>

#include “HT_SSD1306Wire.h”

#include <Adafruit_BMP280.h>

#ifdef WIRELESS_STICK_V3

static SSD1306Wire display(0x3c, 500000, SDA_OLED, SCL_OLED, GEOMETRY_64_32, RST_OLED);

#else

static SSD1306Wire display(0x3c, 500000, SDA_OLED, SCL_OLED, GEOMETRY_128_64, RST_OLED);

#endif

Adafruit_BMP280 bmp(&Wire1);

unsigned long updateCounter = 0; // Counter for updates

const float tempOffset = -4.5; // Adjust to align with 75°F (23.9°C)

const float altitude = 1000.0; // Adjust to your altitude in meters

void VextON(void) {

pinMode(Vext, OUTPUT);

digitalWrite(Vext, LOW);

}

void setup() {

Serial.begin(115200);

Serial.println(“Starting BMP280 Continuous Display…”);

VextON();

delay(100);

// Initialize OLED (uses Wire on default pins: SDA_OLED=4, SCL_OLED=15)

display.init();

display.clear();

display.display();

display.setContrast(255);

Serial.println(“OLED initialized”);

// Initialize second I2C bus for BMP280 (pins 41 SDA, 42 SCL)

Wire1.begin(41, 42);

Serial.println(“Wire1 initialized on pins 41, 42”);

// Initialize BMP280

if (!bmp.begin(0x76)) {

Serial.println("BMP280 Failed");

display.clear();

display.setTextAlignment(TEXT_ALIGN_CENTER);

display.setFont(ArialMT_Plain_10);

display.drawString(display.getWidth()/2, display.getHeight()/2-10/2, "BMP280 Failed");

display.display();

while (1);

}

Serial.println(“BMP280 OK”);

}

void loop() {

updateCounter++; // Increment counter

// Read BMP280 data

float tempC = bmp.readTemperature() + tempOffset; // Apply offset

float tempF = tempC * 9.0 / 5.0 + 32.0; // Convert to °F

float pressure = bmp.readPressure() / 100.0F; // hPa

// Convert to sea-level pressure (hPa)

float seaLevelPressure = pressure / pow(1.0 - 0.0000225577 * altitude, 5.255);

float pressureInHg = seaLevelPressure / 33.8639; // Convert to inHg

// Display data

display.clear();

display.setTextAlignment(TEXT_ALIGN_LEFT);

display.setFont(ArialMT_Plain_10);

String tempStr = “T: " + String(tempF, 1) + " F”;

String pressStr = “P: " + String(pressureInHg, 2) + " inHg”;

String countStr = "C: " + String(updateCounter);

#ifdef WIRELESS_STICK_V3

display.drawString(0, 0, tempStr);

display.drawString(0, 12, pressStr);

display.drawString(0, 24, countStr);

#else

display.drawString(0, 10, tempStr);

display.drawString(0, 30, pressStr);

display.drawString(0, 50, countStr);

#endif

display.display();

// Serial output

Serial.print("Update ");

Serial.print(updateCounter);

Serial.print(": ");

Serial.print(tempStr);

Serial.print(", ");

Serial.print(pressStr);

Serial.println();

delay(2000); // Update every 2 seconds

}