--- tag: m0043 title: Debug Pins brief: Get information about pins. author: thinkyhead experimental: true requires: PINS_DEBUGGING group: debug codes: [ M43 ] notes: - Requires `PINS_DEBUGGING`. This feature should be disabled for production use. parameters: - tag: P optional: true description: Digital Pin Number values: - tag: pin type: int - tag: W optional: true description: Watch pins - tag: E optional: true description: Watch endstops values: - type: bool - tag: T optional: true description: Toggle pins - see [`M43 T`](/docs/gcode/M043-T.html) for options values: - tag: S optional: true description: Test BLTouch type servo probes. Use `P` to specify servo index (0-3). Defaults to 0 if `P` omitted values: - tag: I optional: true description: Ignore protection when reporting values values: examples: - pre: Get a report on all pins code: M43 - pre: Get a report on all pins, ignore pin protection list when displaying values code: M43 I - pre: Watch pin 56 for changes code: M43 P56 W - pre: Start watching endstops code: M43 E1 - pre: Toggle pins 3-6 five times with 1 second low and 1 second high pulses but only if the pin isn't in the protected list. code: M43 T S3 L6 R5 W1000 - pre: Test probe controlled by servo index 2. code: M43 S P2 --- When setting up or debugging a machine it's useful to know how pins are assigned to functions by the firmware, and to be able to find pins for use with new functions. [`M43`](/docs/gcode/M043.html) provides these tools. [`M43`](/docs/gcode/M043.html) by itself reports all pin assignments. Use `P` to specify a single pin. Use `I` to report the values on pins that are protected. Use `W` to watch the specified pin, or all pins. Use the `E` option to monitor endstops. Use `S` option to test a BLTouch type servo probe. Use `T` option to toggle pins. The `W` watch mode option continues looping, blocking all further commands, until the board is reset. If `EMERGENCY_PARSER` is enabled, [`M108`](/docs/gcode/M108.html) may also be used to exit the watch loop without needing to reset the board. See [`M43 T`](/docs/gcode/M043-T.html) for Pins Debugging toggle options.