karawin / Ka-Radio32

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

SSD1306 display shifted 1 pixel to the right? #15

Closed gerardwr closed 6 years ago

gerardwr commented 6 years ago

Hi,

I attached an SSD1306 Oled today on my Ka-Radio32 ESP32. It's an I2C display without an RST line.

karadio lcd

The display works (almost) perfectly, but it looks like the pixels that should be in the last column on the right are displayed in the first column on the left (see arrows in my JPG).

It seems like the entire screen is scrolled to the right by 1 pixel, and the last pixel of the line is displayed in the 1st column of the Oled.

I have tried the following, but it makes no difference

Karadio version is V0.9 R2.

Thanks for an excellent piece of software!

gerardwr commented 6 years ago

I solved the problem.

The default configured display is an SSD1106 (lcd.type = 0).

To configure for an SSD1306 you have to set lcd.type to 1, using the serial interface. The correct command is:

lcd.type("1")

Response is

##LCD is in 1 on next reset#

After reset the picture on the Oled display is fine!

Thx.

gerardwr commented 6 years ago

Setting the LCD type can also be done using telnet. Did it on my iMac like this:


imac-van-gerard:~ gerard$ telnet 192.168.0.56
Trying 192.168.0.56...
Connected to 192.168.0.56.
Escape character is '^]'.
Karadio telnet
> lcd.type("1")
##LCD is in 1 on next reset#
> sys.boot