B4R Question ESP8266 and OLED Shield

BaGRoS

Active Member
Licensed User
Longtime User
Hi
I have a question about OLED Shield. I have a device on my site:
https://www.aliexpress.com/item/OLE...mini-0-66-zoll-64X48-IIC-I2C/32726566397.html
supposedly partly works because "something" displays, unfortunately not in the right place.
20171128_165856.jpg
I started the code from the site: https://www.b4x.com/android/forum/threads/radafruitssd1306-oled-displays.68906/ unfortunately there is no way to set the resolution.
I also have another display and it works without any problems.
20171128_165826.jpg
I attach pictures.
Maybe some ideas?
 
Last edited:

BaGRoS

Active Member
Licensed User
Longtime User
I research a little bit and

B4X:
Private Sub Clock_Tick
  
    ssd.ClearDisplay
    ssd.GFX.SetCursor(32, 8)
    ssd.GFX.ConfigureText(1, ssd.WHITE, False)
    ssd.GFX.DrawText("D:").DrawText(TimeNIST.GetDate)
  
    ssd.GFX.SetCursor(32, 20)
    ssd.GFX.ConfigureText(1, ssd.WHITE, False)
    ssd.GFX.DrawText("T:").DrawText(NumberFormat(TimeNIST.GetHours, 2, 0)).DrawText(":").DrawText(NumberFormat(TimeNIST.GetMinutes, 2, 0))
    ssd.GFX.DrawText(":").DrawText(NumberFormat(TimeNIST.GetSeconds, 2, 0))
    ssd.Display

'    x=x+1
'    If x > 50 Then
'        x=0
'        y=y+1
'        If y>50 Then
'            y=0
'        End If
'    End If
'    ssd.ClearDisplay
'    ssd.GFX.SetCursor(x,y)
'    ssd.GFX.DrawText(x).DrawText(";").DrawText(y)
'    ssd.Display
'    Log(x,"; ",y)

End Sub

Is it possible to edit the library to add offset x=32 y=8 when it recognizes this smaller screen?
https://github.com/mcauser/Adafruit_SSD1306/tree/esp8266-64x48
 
Upvote 0
Top