Adding a Wireless Button
Important Note
- The wireless button requires the battery to be installed, and the battery model is
CR927
- After returning to the home page, click on the
+
in the red box in the image - After this interface appears, press the wireless button with the installed battery normally
- The ID of the wireless button will be automatically generated in the red box, and this ID is unique
- Enter the name you want for the button in the red box
- Click on the first red box, and a second blue box will appear
Notice
- Custom GCODE and requesting API are controlled via wireless connection
- Triggering GPIO is controlled via wired connection
Custom GCODE
- To customize
GCODE
, enter the code or macro name you need to execute in the red box, and AirClick will automatically send it to Klipper for execution
Request API
- You can achieve custom macros, emergency stop, Klipper restart, firmware restart, system shutdown, etc.
Trigger GPIO
-
Triggering GPIO requires connecting STM32F072 to Klipper
-
For firmware burning and connection, refer to this document
Firmware Burning and Connection -
The available IOs are
PB0
toPB9
, totaling ten IOs. After properly burning the firmware and connecting to Klipper, just configure as follows[mcu AirClick]
serial: /dev/serial/by-id/usb-Klipper_stm32f072xb_AirClick-if00
### Search for USB ID and modify this section
[gcode_button _test]
pin: ^!AirClick:PB0
press_gcode:
M118 PB0
[gcode_button _test1]
pin: ^!AirClick:PB1
press_gcode:
M118 PB1
[gcode_button _test2]
pin: ^!AirClick:PB2
press_gcode:
M118 PB2
[gcode_button _test3]
pin: ^!AirClick:PB3
press_gcode:
M118 PB3
[gcode_button _test4]
pin: ^!AirClick:PB4
press_gcode:
M118 PB4
[gcode_button _test5]
pin: ^!AirClick:PB5
press_gcode:
M118 PB5
[gcode_button _test6]
pin: ^!AirClick:PB6
press_gcode:
M118 PB6
[gcode_button _test7]
pin: ^!AirClick:PB7
press_gcode:
M118 PB7
[gcode_button _test8]
pin: ^!AirClick:PB8
press_gcode:
M118 PB8
[gcode_button _test9]
pin: ^!AirClick:PB9
press_gcode:
M118 PB9