Skip to main content

Wireless Button Addition

Important Note
  • The wireless button requires a battery to be installed. The battery model is CR927.
  • After returning to the homepage, click the + in the red box in the image.
    Loading...
  • After the following interface appears, press the wireless button with the battery installed normally.
  • The wireless button's ID will be automatically generated in the red box. This ID is unique.
    Loading...
  • Enter the name you want to give the button in the red box.
    Loading...
  • Click the first red box, and the second blue box will appear.
    Loading...
Notice
  • Custom GCODE and API requests are controlled via wireless connection.
  • Triggering GPIO is controlled via wired connection.

Custom GCODE

  • For custom GCODE, you can enter the code or macro name you need to execute in the red box. AirClick will automatically send it to the printer for execution.
    Loading...

Request API

  1. Predefined APIs can implement custom macros, emergency stop, Klipper restart, firmware restart, system shutdown, etc.
Loading...
  1. Custom API Instructions
    • All APIs refer to the documentation Moonraker API
    • method should match the method in Moonraker API.
    • params should match the params in Moonraker API.
  2. Example: API for starting to print a specified file.
    • The image below shows the official Moonraker documentation example.
    Loading...
    • The image below shows the API filling example in AirClick.
    Loading...
  3. Save this button to implement starting the print of the specified file.

Trigger GPIO (Klipper Only)

  • Triggering GPIO requires connecting the STM32F072 to Klipper.

  • For firmware flashing and connection, please refer to this document: Firmware Flashing and Connection

  • The available IOs are PB0 to PB9, a total of ten IOs. After normal firmware flashing and connection to Klipper, you only need to configure them normally. Below is a reference configuration.

    [mcu AirClick]
    serial: /dev/serial/by-id/usb-Klipper_stm32f072xb_AirClick-if00
    ### Modify this after searching for the USB ID.

    [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
Loading...