---
tag: m0043b
title: Toggle Pins
brief: Toggle pins states
author: thinkyhead
contrib: TwoRedCells

group: debug
requires: PINS_DEBUGGING

codes: [ M43 T ]

notes:
- Requires `PINS_DEBUGGING`. This feature should be disabled for production use.
- See [`M43`](/docs/gcode/M043.html) for other pins debug options.

parameters:

- tag: S
  optional: true
  description: "Start Pin number. (Default: 0)"
  values:
  - tag: pin
    type: int

- tag: L
  optional: true
  description: "End Pin number. (Default: last pin)"
  values:
  - tag: pin
    type: int

- tag: I
  optional: true
  description: Flag to ignore Marlin's pin protection. **Use with caution!**
  values:
    -
      type: bool

- tag: R
  optional: true
  description: "Number of times to toggle each pin. (Default: 1)"
  values:
  - tag: count
    type: int

- tag: W
  optional: true
  description: "Wait time (in milliseconds) transitions. (Default: 500)."
  values:
  - tag: time
    type: int

example:
- pre: Toggle unprotected pins from 3 to 6 five times each with 1 second low / high pulses.
  code: M43 T S3 L6 R5 W1000

---

The `M43 T` command toggles one or more pins.
