-
Notifications
You must be signed in to change notification settings - Fork 2
4. Configuration (Linux)
Included in extras are some example scripts (the scripts that I use with my Adafruit DC & Stepper Motor Hat).
Note: Scripts need to have execute privileges (chmod +x
). A first line with #! is recommended.
Each .sh file is a wrapper for the .py file of the same name. The .sh file has some additional "debugging" output. The configuration page shows the following command for M106:
/home/pi/fan2.sh
which is the "log everything debug version". This could be replaced by:
python /home/pi/fan2.py
The plugin will parse the GCode M106 command and append the S value to the command line (i.e. "M106 S255" will cause the above command to be executed with " 255" appended to the end of the line).
The following table gives a short description of each of the provided examples. Each file has a .sh and a .py version where the .sh is just a wrapper for the .py file with additional debugging.
Filename | Description |
---|---|
fan |
script to control one fan |
fanoff |
script to turn off one fan |
fan2 |
script to control two fans |
fanoff |
script to turn off two fans |
The file fanspeedtest.gcode
is a test print containing just fan commands and delays.
The file fanspeedquick.gcode
is a shorter version of the test print.