Sorry this setup is for using a relay (or direct connect) to trigger the 3d Chameleon. I would suggest you modify
SET_PIN PIN=3dchameleon VALUE=1
G4 P500 ; dwell for .5 seconds - adjust this to match your machines single pulse time
SET_PIN PIN=3dchameleon VALUE=0
to what comes from the automated gcode generator.
If you have a direct connection or a relay to PG10 to act as your switch, see below but you don't need both. I use a relay because, well, I had one, and I don't have to worry about different grounding on the boards and voltage differences. YMMV
If you have the PG10 connected to act as the button, then you need this in your printer.cfg:
[output_pin 3dchameleon] ; <------ this is the name you give the pin, and use in the macros
pin: PC15 ;<------------------change this to your pin!
# The pin to configure as an output. This parameter must be
# provided.
#pwm: False
# Set if the output pin should be capable of pulse-width-modulation.
# If this is true, the value fields should be between 0 and 1; if it
# is false the value fields should be either 0 or 1. The default is
# False.
#static_value:
# If this is set, then the pin is assigned to this value at startup
# and the pin can not be changed during runtime. A static pin uses
# slightly less ram in the micro-controller. The default is to use
# runtime configuration of pins.
value: 0
# The value to initially set the pin to during MCU configuration.
# The default is 0 (for low voltage).
#shutdown_value:
# The value to set the pin to on an MCU shutdown event. The default
# is 0 (for low voltage).
#maximum_mcu_duration:
# The maximum duration a non-shutdown value may be driven by the MCU
# without an acknowledge from the host.
# If host can not keep up with an update, the MCU will shutdown
# and set all pins to their respective shutdown values.
# Default: 0 (disabled)
# Usual values are around 5 seconds.
#cycle_time: 0.100
# The amount of time (in seconds) per PWM cycle. It is recommended
# this be 10 milliseconds or greater when using software based PWM.
# The default is 0.100 seconds for pwm pins.
#hardware_pwm: False
# Enable this to use hardware PWM instead of software PWM. When
# using hardware PWM the actual cycle time is constrained by the
# implementation and may be significantly different than the
# requested cycle_time. The default is False.
#scale:
# This parameter can be used to alter how the 'value' and
# 'shutdown_value' parameters are interpreted for pwm pins. If
# provided, then the 'value' parameter should be between 0.0 and
# 'scale'. This may be useful when configuring a PWM pin that
# controls a stepper voltage reference. The 'scale' can be set to
# the equivalent stepper amperage if the PWM were fully enabled, and
# then the 'value' parameter can be specified using the desired
# amperage for the stepper. The default is to not scale the 'value'
# parameter.
Did that answer your question?