# This file must be renamed to vfd.conf and placed in the /storage/.config/ folder. # # Le Potato - OLED SSD1306 128x64 configuration #-------------------- #gpio_xxx: # [0] 0 = &gpio, 1 = &gpio_ao. # [1] pin number - https://github.com/openSUSE/kernel/blob/master/include/dt-bindings/gpio/meson-gxl-gpio.h # [2] Reserved - must be 0. (0xFF in vfd_gpio_stb skips this entry, required for 2-wire protocols) vfd_gpio_clk='0,0,0xFF' vfd_gpio_dat='0,0,0xFF' vfd_gpio_stb='0,0,0xFF' #gpio_protocol: # [0] 0 = No hardware protocols, 1 = Hardware I2C # [1] device_id = The device id of the hardware protocol, usually defined in the DTB. vfd_gpio_protocol='1,2' # On display: # VCC - 5V (Le Potato: Pin #2) # GND - GND (Le Potato: Pin #6) # SCL - vfd_gpio_clk = GPIODV_27 (I2C_SCK_B - Le Potato: Pin #28) # SDA - vfd_gpio_dat = GPIODV_26 (I2C_SDA_B - Le Potato: Pin #27) #chars: # < DHHMM > Order of display chars (D=dots, represented by a single char) # This field is required but is unused. vfd_chars='0,1,2,3,4' #dot_bits: # Order of dot bits. Typical configurations: # This field is required but is unused. vfd_dot_bits='0,1,2,3,4,5,6' #display_type: # * In [] brackets are the bit index from 0 to 7. You can use the 'Programmer' mode in Calculator to generate the hexadecimal value you need for the following fields. # {0} - Columns = ([0:2] + 1) * 16. Rows = ([3:5] + 1) * 8. Shift display = [6:7] * 2. # Examples: For a 128x32 display, the value should be 0x1F. # For a 128x64 display, the value should be 0x3F. # For a SH1106 128x64 display, the value should be 0x7F. # {1} - I2C address - Usually 0x3C or 0x3D. # {2} - Flags. [0] - Reserved. [1] - invert display. [2] - rotate display by 90 degrees. [3] - rotate display by 180 degrees (adds or [2]). [4] - Ext_Vcc - leave at 0. [5] - Alternative COM configuration, set to 1 if display is scrambled. # Examples: To flip the display upside down, the value should be 0x08. To rotate 90 degrees - 0x04, to rotate 270 degrees - 0x0C. # To invert the pixels of the display, the value should be 0x02. # {3} - Controller. 0xFD for SSD1306, 0xFC for SH1106. vfd_display_type='0x3F,0x3C,0x28,0xFD'