BTT mini12864 display - LED control issue

Basic Information:

Printer Model: DIY CoreXY
MCU / Printerboard: BTT Octopus Pro v1.1 (STM32h723)
Display: BTT mini12864 v2.0
klippy.log
klippy.log (22.4 KB)

Describe your issue:


While trying to install BTT mini1286 display I found about public example don’t work as expected in controlling LEDs in my config.
Here 1 LED for display background color and another two… just LEDs.

SET_LED gcode command do like “random”. While with same input - same result, but this result is not as expected to be. Looks like input values (from 0.0 to 1.0) converted to bit sequence, but this bits goes into wrong place/order.

My config:

[display]
#	mini12864 LCD Display
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
contrast: 53
spi_bus: spi1
#spi_software_miso_pin: EXP2_1
#spi_software_mosi_pin: EXP2_6
#spi_software_sclk_pin: EXP2_2

[neopixel btt_mini12864]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 0.3
initial_GREEN: 0.3
initial_BLUE: 0.3

[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
    SET_LED LED=btt_mini12864 RED=0.0 GREEN=0.0 BLUE=0.0 INDEX=1 TRANSMIT=0
    SET_LED LED=btt_mini12864 RED=0.1 GREEN=0.0 BLUE=0.0 INDEX=2 TRANSMIT=0
    SET_LED LED=btt_mini12864 RED=0.0 GREEN=0.0 BLUE=0.0 INDEX=3

I have TMC2240 drivers at spi1 bus, and spi1 bus pins also used for EXP2 connector in BTT Octopus Pro, software spi config can’t be used on same pins.
Display and buttons seems work okay, problem is only in controlling LEDs on it.


With this configuration is ok

If I will try to change values, then colors and index do not works as expected, i will try to record a video

So here is video example.

Starting with this config, then changing values of colors

[neopixel btt_mini12864]
pin: EXP1_6
chain_count: 3
color_order: RGB
initial_RED: 0.3
initial_GREEN: 0.3
initial_BLUE: 0.3

[delayed_gcode setdisplayneopixel]
initial_duration: 1
gcode:
    SET_LED LED=btt_mini12864 RED=1.0 GREEN=1.0 BLUE=1.0 INDEX=1 TRANSMIT=0
    SET_LED LED=btt_mini12864 RED=1.0 GREEN=0.0 BLUE=0.0 INDEX=2 TRANSMIT=0
    SET_LED LED=btt_mini12864 RED=1.0 GREEN=0.0 BLUE=0.0 INDEX=3

[display]
lcd_type: uc1701
cs_pin: EXP1_3
a0_pin: EXP1_4
rst_pin: EXP1_5
encoder_pins: ^EXP2_5, ^EXP2_3
click_pin: ^!EXP1_2
contrast: 53
spi_bus: spi1

[board_pins]
aliases:
    # EXP1 header
    EXP1_1=PE8, EXP1_2=PE7,
    EXP1_3=PE9, EXP1_4=PE10,
    EXP1_5=PE12, EXP1_6=PE13,    
    EXP1_7=PE14, EXP1_8=PE15,
    EXP1_9=<GND>, EXP1_10=<5V>,

    # EXP2 header
    EXP2_1=PA6, EXP2_2=PA5,
    EXP2_3=PB1, EXP2_4=PA4,
    EXP2_5=PB2, EXP2_6=PA7,      
    EXP2_7=PC15, EXP2_8=<RST>,
    EXP2_9=<GND>, EXP2_10=PC5

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.