Can't use any of the GPIO through Klipper

Basic Information:

Printer Model: Ender 3 V3 SE
MCU / Printerboard: stock
Host / SBC RPi 3B+
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

Hello Everyone,
I recently switched from a headless setup to a display with Klipper screen on my RPi3B+, but had a ton of issues doing it starting from my old Raspian Lite setup, so I decided to do a clean install of Raspian, re-install Klipper, transfer the conf files etc.
Before embarking on this journey, as accessories to the whole setup I was also running a RPi camera with an LED connected to the hardware PWM on GPIO12 as flash, and two MPU accelerometers.
I pretty much got everything running again as was, and I got Klipper Screen too, happy days.

However, as much as I tried I can’t get the accelerometers and the LED to work through the console on Mainsail.

I know there are no hardware issues because I can still get everything to work fine on the old SD card that still has the old setup, I can even control the LED by SSHing into the RPi and using raspi-gpio, but if I use the slider on Mainsail, the LED just doesn’t do anything and I get no errors, whilst last I tried reaching the accelerometers I got a NACK response and Klipper shut down.

I followed all the steps in the [RPi_microcontroller] and [Measuring_Resonances] documentations with no errors whatsoever.

I am at a loss.
Help please?
klippy.zip (3.5 MB)

I’m just going to up this one. No one has ideas?

Have you done as described here?

https://www.klipper3d.org/RPi_microcontroller.html

Yes, I have.

Install the rc script :white_check_mark:
Building the micro-controller code :white_check_mark:
Remaining configuration :white_check_mark: (you should be able to see it in the klippy log too)
Optional: Enabling SPI :white_check_mark: (I don’t think it’s needed in my case, but what the hell)
Optional: Enabling I2C :white_check_mark:
Optional: Identify the correct gpiochip :white_check_mark:
Optional: Hardware PWM :white_check_mark:

Are you able to:

:white_check_mark:

:white_check_mark:

Well, I’ve tried reinstalling the RPi microcontroller code but it was pretty much a vane attempt. The only thing I haven’t tried is completely uninstalling said code and then reinstalling, but I lack the how to knowledge on that.

Can anybody nudge me in the right direction?

Basic Information:

Printer Model: Hevort
MCU / Printerboard: Spider V3
Host / SBC RPi 4B 8gb

Hey,

I have the same problem.

After I installed rpi MCU it was working some days then it stopped and I don’t get if back working.
I want to use the flip pins for some buttons on the printer (led on, LED off, pause, abort)
And for the CPAP fan like Simon showed for the VZ printer.
klippy.log (71.3 KB)

I hope some one can help me.
Tomorrow I will post my klippy.log

Thank you very much

i also have an ender3 pro from a colleague with me. i would like to control the hotend fan via a gpio pin on the rpi because he has a cheap silentboard that doesn’t have enough outputs.

[heater_fan 1]
pin:            host:gpio21
heater:         extruder
heater_temp:    50.0
fan_speed:      1.0

every time klipper start the relay goes on dont matter if the extruder has 50°C or not
klippy ender.log (293.1 KB)

Depending on the type of SBC and the chosen GPIO, they have a predetermined startup value. You can use:

[output_pin my_pin]
pin: ...
value: # <------- set to either 0 or 1 depending on the needs

ok i solved this with a “^” sign

[gcode_button pause]
pin: ^host:gpiochip0/gpio26
press_gcode: PAUSE

[gcode_button resume]
pin: ^host:gpiochip0/gpio19
press_gcode: RESUME

[gcode_button Led On]
pin: ^host:gpiochip0/gpio21
press_gcode: SET_PIN PIN=LED VALUE=1

[gcode_button Led Off]
pin: ^host:gpiochip0/gpio20
press_gcode: SET_PIN PIN=LED VALUE=0

your answer giving me the direction :wink:

thanks for your reply i will try this at the weekend

but i think the output pin can not switch on if the extruder temp rises 50°C or iam wrong?

You still need the logic when to turn on the pin. The above setting will only make sure that you have a determined starting point.

Thank you,

i tried to use the output pin but nothing changed.

klippy ender 2.log (1.0 MB)

when klipper is ready the relay is acive and if i change the status for the pin with moonraker it stays on.

and please can you explain me how i can use the logic of the temperatur fan?

best regards

@Sineos Thank you for your help.

i dont know why it is working now…
i tryed again and again and again and now it´s working.

i played a little bit around with the pin number but iam back at the original pin and hat the temperatur fan section working