ivmarkov/rust-esp32-std-demo

Heltec: OLED doesn't work

Opened this issue · 0 comments

I have a Heltec WiFi LoRa 32 (V3) board, which isn't yet supported by this repository, but it's very similar and I just had to switch a few pins.

When trying to talk to the display, I had a few issues:

  1. The display gets completely reset (back to black) at the end of heltec_hello_world(which means you can't see anything).
    I believe this is because the PinDriver has a Drop implementation that resets the pin - so the RST gets set back to zero, clearing the display. I'm not sure what the best solution is, maybe pulling the driver out to main so it survives longer.

  2. After solving that, I had a completely white display instead of the expected text "Hello Rust". This is because in led_draw_customit draws a rectangle with fill=On, so the whole display is already On, and the text writing doesn't show. Two possible solutions are either setting fill=Off or foreground=off, so there's contrast between text and rectangle.