rPi GPIO as output for artisan internal PWM #1106
-
I'm wondering if it's possible for Artisan to use the Raspberry Pi GPIO to output a PWM signal to an SSR for fan control. I do this on my 3d printer so I know it's possible for the Pi to control the SSR via GPIO, I just haven't been able to find out how to define this type of control in Artisan. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Artisan dies not directly support such control of GPIOs. However Artisan does interface nicely with external programs that can control whatever you desire. Thus, you will need to write your own control program for that GPIO/PWM. Assuming you want to control the PWM with a slider in Artisan, you set the slider's action to "Call Program" and enter the appropriate paths to execute your program. When the slider is adjusted Artisan will start that program and pass it the desired PWM setting. A similar approach works for buttons and alarms as well. Here is an example using a simple Python program. This program takes a command line value and writes it to a file, currval.txt. Your program would of course have to take that value and do what is necessary to set the PWM output. test.py
We want Artisan to start this external program with the new slider value each time the Air slider is adjusted. Configure the Air slider event to start an instance of Python to run the program test.py. The {} brackets on the command line are the placeholder for the current slider value. For more detail click the Help button. |
Beta Was this translation helpful? Give feedback.
Artisan dies not directly support such control of GPIOs. However Artisan does interface nicely with external programs that can control whatever you desire. Thus, you will need to write your own control program for that GPIO/PWM.
Assuming you want to control the PWM with a slider in Artisan, you set the slider's action to "Call Program" and enter the appropriate paths to execute your program. When the slider is adjusted Artisan will start that program and pass it the desired PWM setting. A similar approach works for buttons and alarms as well.
Here is an example using a simple Python program. This program takes a command line value and writes it to a file, currval.txt. Your program would o…