/
klipper-mini12864.cfg
44 lines (40 loc) · 1.08 KB
/
klipper-mini12864.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[mcu menu]
# Uncomment serial and update with proper path
# Find serial path by running terminal command: ls /dev/serial/by-id/*
#serial: **PASTE YOUR SERIAL PORT HERE AND UNCOMMENT**
restart_method: command
[display]
lcd_type: uc1701
kill_pin: !menu:PF0
spi_bus: spi1
cs_pin: menu:PA4
a0_pin: menu:PA2
rst_pin: menu:PA3
contrast: 63
encoder_pins: ^menu:PA0, ^menu:PA1
click_pin: ^!menu:PB1
[output_pin BEEPER_pin]
pin: menu:PF1
pwm: True
value: 0
shutdown_value: 0
cycle_time: 0.001
scale: 1000
[gcode_macro M300]
gcode:
# Use a default 1kHz tone if S is omitted.
{% set S = params.S|default(1000)|int %}
# Use a 10ms duration is P is omitted.
{% set P = params.P|default(100)|int %}
SET_PIN PIN=BEEPER_pin VALUE={S} CYCLE_TIME={ 1.0/S if S > 0 else 1 }
G4 P{P}
SET_PIN PIN=BEEPER_pin VALUE=0
# name of neopixel should match name referenced in printer.cfg
# if there are other gcode_macros referencing the led display (e.g delayed gcode_macro)
[neopixel fysetc_mini12864]
pin: menu:PA13
chain_count: 3
color_order: RGB
initial_RED: 1.0
initial_GREEN: 1.0
initial_BLUE: 1.0