The 3D Chameleon was designed to be universal, so it simply uses a switch or digital I/O pin to activate it. Klipper is capable of driving a digital pin, so it's pretty easy to integrate it with it.
The basics are simple... the M42 command is used to toggle an I/O pin and G4 is used to determine the pause length.
So, our a command sequence of:
M42 P17 S0 ; set pin 17 to low
M42 P17 S1 ; set pin 17 to high
G0 P400 ; wait 400 ms
M32 P17 S0; return pin 17 to low
Will cause the 3D Chameleon to move to unload the current color and switch to color 1 if you're using the digital I/O method.
If you're using the button press, you simply replace the M42 commands with the appropriate G0 commands to move to the holding location, move to engage the button, and move away from the button after your desired delay.
Bill
Looks like the trigger switch on the 3d chamelon has 5V. The rasp pi 3 gpio pins are only 3.3V. Does this mean I'll need some sort of mosfet or relay to send the correct 5V signal or will 3.3V suffice?
The 3D Chameleon was designed to be universal, so it simply uses a switch or digital I/O pin to activate it. Klipper is capable of driving a digital pin, so it's pretty easy to integrate it with it. The basics are simple... the M42 command is used to toggle an I/O pin and G4 is used to determine the pause length. So, our a command sequence of:
M42 P17 S0 ; set pin 17 to low M42 P17 S1 ; set pin 17 to high G0 P400 ; wait 400 ms
M32 P17 S0; return pin 17 to low Will cause the 3D Chameleon to move to unload the current color and switch to color 1 if you're using the digital I/O method. If you're using the button press, you simply replace the M42 commands with the appropriate G0 commands to move to the holding location, move to engage the button, and move away from the button after your desired delay. Bill