karawin / Ka-Radio32

esp32 version of Ka-Radio (https://github.com/karawin/Ka-Radio) by jp Cocatrix
527 stars 155 forks source link

Oled display automatic switched off #72

Closed gerardwr closed 5 years ago

gerardwr commented 5 years ago

Hi,

I compiled Karadio32 myself, to enable using the onboard SSD1306 Oled display on my ESP32 board. I only changed the GPIO pins in gpio.h:

#define PIN_I2C_SCL GPIO_NUM_15
#define PIN_I2C_SDA GPIO_NUM_4
#define PIN_I2C_RST GPIO_NUM_16     // or not used

Before Flashing the binary I completely erased the ESP32 using ESPTOOL.

After Reset the ESP32 starts OK:

But immediately after displaying the Karadio32 screen the Oled is dark and does not display anything anymore, and seems to be switched off.

Both the CLI and the Karadio32 webpage can be used fine, so Karadio32 is still running. But after the initial pages on the Oled the display remains dark.

I checked lcdout using CLI. It is set to ZERO, so no timer on switching the display off.

##LCD out is 0#

Can you help me solve this?

gerardwr commented 5 years ago

Problem solved! schermafbeelding 2018-11-30 om 23 44 18

GPIO16 required for my Oled display was already in use for the encoder

#define PIN_ENC0_A   GPIO_NUM_16    //16    // 255 if encoder not used

After I changed the encoder GPIO definition, the Oled stays ON all the time. It seems like the encoder code resets my Oled.

Thanks for an excellent Karadio32 software!

onurguc commented 5 years ago

I have a similar need with my WeMos board (ESP32 with OLED display). However I was not able have it working at all. I changed the I2C communication pins to the OLED display as following (1306 is soldered on card this way) The screen doesn't display anything.

define PIN_I2C_SCL GPIO_NUM_4

define PIN_I2C_SDA GPIO_NUM_5

define PIN_I2C_RST GPIO_NUM_2 // or not used

https://github.com/FablabTorino/AUG-Torino/wiki/Wemos-Lolin-board-(ESP32-with-128x64-SSD1306-I2C-OLED-display)

I was wondering if anyone else have a similar problem.