Emergency Stop and Filament Sensor with Rpi

Hi!

I’m now running klipper for a few months on my Ender 3 with v4.2.7 board and it’s running very well. Now my package arrived and I wanted to attach a self-made Filament Sensor from the leftover Z-Endstop from my Ender 3 and an Emergency Stop button, both connected to the gpio of the Pi.
Now connecting both to Ground and GPIO4/27 does not work. Also connecting to the 3,3V supply instead of ground also didn’t work (tested it because I saw with gpioinfo that the pins are configured as input).
Also changing the pins to pullup didn’t work… so I assume that I’m overlooking something here and would appreciate any help.

I also attached my printer.cfg so that you can look at my current setup.
printer.cfg (10.1 KB)

Were you able to get this working?

I only got the stop button working. I didn’t had the need to try the filament sensor but it should also work like this:

[gcode_button stop]
pin: !rpi:gpio23
press_gcode: M112
1 Like

See Raspberry Pi GPIO internal pullup doesn't work · Issue #4207 · Klipper3d/klipper · GitHub
You probably will need an external pullup