Heltec 32 lora V£ screen

Hi,
I put one of my heltecs aside, because the screen stopped working.
Today I thought I’d try that module as a TX and a walking range test.
I accidentally put the RX code on it and the screen worked. I notice that the offending module has V3.1 bottom right, where the others are V3.2.
Has anyone else fallen fowl of this?
C

3.1 and 3.2 should work the same.

what are the testing code links to check them out?

Hi R,
I get varying results, with the 3.2 version, sometimes the screen is black but with the bottom code here, it is dim.
C.

This works with 3.1 and 3.2:


  delay(2000);

and this works with 3.1, but is dim on 3.2:

#include <heltec_unofficial.h>

// ------------------ IDENTIFIERS ------------------
#define BASE_ID "BASE"
#define REMOTE_ID "REMOTE"

// ------------------ FREQUENCIES ------------------
#define FROM_BASE_FREQ 863.8    // BASE → REPEATER
#define TO_REMOTE_FREQ 864.4    // REPEATER → REMOTE
#define FROM_REMOTE_FREQ 865.0  // REMOTE → REPEATER
#define TO_BASE_FREQ 865.8      // REPEATER → BASE

// ------------------ RADIO SETTINGS ------------------
#define BANDWIDTH 125
#define SPREADING_FACTOR 9
#define TRANSMIT_POWER 0

// ------------------ STATE ------------------
volatile bool rxFlag = false;
String rxData;

enum RxSource {
  RX_FROM_BASE,
  RX_FROM_REMOTE
};

RxSource currentRxSource = RX_FROM_BASE;

// ------------------ ISR ------------------
void rxISR() {
  rxFlag = true;
}

// ------------------ RADIO MODES ------------------
void setRadioRx(float freq, RxSource src) {
  currentRxSource = src;
  radio.standby();
  radio.setFrequency(freq);
  delay(10);
  radio.startReceive(RADIOLIB_SX126X_RX_TIMEOUT_INF);
}

void setRadioTx(float freq) {
  radio.standby();
  radio.setFrequency(freq);
}

// ------------------ GPS PARSER ------------------
bool parseGps(const String& msg, float& lat, float& lon, String& date, String& time) {
  int c1 = msg.indexOf(',');
  int c2 = msg.indexOf(',', c1 + 1);
  int c3 = msg.indexOf(',', c2 + 1);
  int c4 = msg.indexOf(',', c3 + 1);

  if (c1 > 0 && c2 > c1 && c3 > c2 && c4 > c3) {
    lat = msg.substring(c1 + 1, c2).toFloat();
    lon = msg.substring(c2 + 1, c3).toFloat();
    date = msg.substring(c3 + 1, c4);
    time = msg.substring(c4 + 1);
    return true;
  }
  return false;
}

// ------------------ DISPLAY ------------------
void showBaseGPS(const String& msg) {
  display.clear();
  display.drawString(0, 0, "BASE GPS");

  float lat, lon;
  String date, time;

  if (parseGps(msg, lat, lon, date, time)) {
    display.drawString(0, 10, "LAT: " + String(lat, 6));
    display.drawString(0, 20, "LON: " + String(lon, 6));
    display.drawString(0, 30, "DATE: " + date);
    display.drawString(0, 40, "TIME: " + time);
  } else {
    display.drawString(0, 10, "PARSE ERROR");
  }

  display.display();
}

void showRemoteGPS(const String& msg) {
  display.clear();
  display.drawString(0, 0, "REMOTE GPS");

  float lat, lon;
  String date, time;

  if (parseGps(msg, lat, lon, date, time)) {
    display.drawString(0, 10, "LAT: " + String(lat, 6));
    display.drawString(0, 20, "LON: " + String(lon, 6));
    display.drawString(0, 30, "DATE: " + date);
    display.drawString(0, 40, "TIME: " + time);
  } else {
    display.drawString(0, 10, "PARSE ERROR");
  }

  display.display();
}

// ------------------ SETUP ------------------
void setup() {
  heltec_setup();
  Serial.begin(9600);

  radio.begin();
  radio.setDio1Action(rxISR);
  radio.setBandwidth(BANDWIDTH);
  radio.setSpreadingFactor(SPREADING_FACTOR);
  radio.setOutputPower((int8_t)TRANSMIT_POWER);

  // Start listening to BASE first
  setRadioRx(FROM_BASE_FREQ, RX_FROM_BASE);

  display.clear();
  display.drawString(0, 0, "REPEATER READY");
  display.drawString(0, 12, "GPS RELAY ACTIVE");
  display.display();
}

// ------------------ LOOP ------------------
void loop() {
  heltec_loop();

  if (!rxFlag) return;
  rxFlag = false;

  rxData = "";
  radio.readData(rxData);

  if (rxData.length() == 0) {
    // Return to last RX side
    if (currentRxSource == RX_FROM_BASE) {
      setRadioRx(FROM_BASE_FREQ, RX_FROM_BASE);
    } else {
      setRadioRx(FROM_REMOTE_FREQ, RX_FROM_REMOTE);
    }
    return;
  }

  Serial.print("RX: ");
  Serial.println(rxData);

  // ------------------ BASE → REMOTE PATH ------------------
  if (rxData.startsWith(BASE_ID) && currentRxSource == RX_FROM_BASE) {

    // Stop RX before long delay
    radio.standby();

    // Show BASE GPS for 10 seconds
    showBaseGPS(rxData);
    delay(10000);

    // Forward to REMOTE
    setRadioTx(TO_REMOTE_FREQ);
    radio.transmit(rxData.c_str());
    radio.finishTransmit();

    // Now listen to REMOTE
    setRadioRx(FROM_REMOTE_FREQ, RX_FROM_REMOTE);
    return;
  }

  // ------------------ REMOTE → BASE PATH ------------------
  if (rxData.startsWith(REMOTE_ID) && currentRxSource == RX_FROM_REMOTE) {

    // Stop RX before long delay
    radio.standby();

    // Show REMOTE GPS for 10 seconds
    showRemoteGPS(rxData);
    delay(10000);

    // Forward to BASE
    setRadioTx(TO_BASE_FREQ);
    radio.transmit(rxData.c_str());
    radio.finishTransmit();

    // Now listen to BASE
    setRadioRx(FROM_BASE_FREQ, RX_FROM_BASE);
    return;
  }

  // ------------------ UNKNOWN / OUT-OF-CONTEXT ------------------
  Serial.println("IGNORED (PREFIX OR SIDE MISMATCH)");

  // Stay on current side
  if (currentRxSource == RX_FROM_BASE) {
    setRadioRx(FROM_BASE_FREQ, RX_FROM_BASE);
  } else {
    setRadioRx(FROM_REMOTE_FREQ, RX_FROM_REMOTE);
  }
}

what are the screen parts of code in this code? to compare this?