Wie kann ich ein led streifen mit octopi steuern

ich mochte gerne den led streifen einbschalten wen ich printe und ausschalten wen der print fertig ist

)

Hallo.
Wie genau steuerst du den LED Streifen denn an?

Über einen Transistor und über den pi

Hi @Matthias_Oten,
need more details, because just switching LEDs is done (with python) like this:
(see https://tutorials-raspberrypi.de/raspberry-pi-gpio-erklaerung-beginner-programmierung-lernen/)

GPIO.setup(23, GPIO.OUT)
GPIO.output(23, GPIO.HIGH)

If you want to react on OctoPrint-Events you need to create a plugin and listen for an event.

class YourPlugin(
...
octoprint.plugin.EventHandlerPlugin
...)

def on_event(self, event, payload):
  if event == Events.FILE_SELECTED:
    # change color of led-stuff
    ....

Nur so nebenbei: Die solltest deine Frage in englisch stellen, dann erreichst du mehr Antworten :wink:

2 Likes

Hi OllisGit
I have a similar problem and maybe you can help.
I want to control the fanspeed for the raspberry by by CPUtemperature.
For this I fojnd instruction to tell the pi to do so with a Phyton Script.

My question is: Where to put this script in an OctoPi environment, so I will alleays autostart and run in background.

Thanks for any suggestions.