Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NOOB Needs Help with ESP32 TTGO Display
#1

Hi, Guys,


Got ESP32 TTGO Oled board. Installed Lobo Firmware!

MicroPython ESP32_LoBo_v3.2.24 - 2018-09-06 on ESP32 board with ESP32
Started playing with display module and stuck as Can't find how to increase text size & change the font:

import machine, display, time, math, network, utime

tft = display.TFT()
tft.init(
    tft.ST7789,
    bgr=False,
    rot=tft.LANDSCAPE,
    miso=17,
    backl_pin=4,
    backl_on=1,
    mosi=19,
    clk=18,
    cs=5,
    dc=16,
)



tft.setwin(40,52,320,240)
for i in range(0, 240):
color = 0xFFF000
tft.line(i, 0, i, 135, color)

tft.set_fg(0x000000)

#tft.ellipse(120, 67, 120, 67)

#tft.line(0, 0, 220, 135)

text = "XXXXXXXXXXXX!"


tft.text(
    120 - int(tft.textWidth(text) / 2), 65 - int(tft.fontSize() [1] / 2), text, 0xFFFFFF
)

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)