aboutsummaryrefslogtreecommitdiffstats
path: root/docs/Config_Reference.md
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-03-23 12:04:42 -0400
committerKevin O'Connor <kevin@koconnor.net>2022-03-31 13:08:12 -0400
commit96795def9c90276bcf3ea00d2292002237363ed6 (patch)
tree709d89c83d0728d789b6ad1e7230c24c4d30fad2 /docs/Config_Reference.md
parent3340bb2ffd23ff86a8b22e238f6c0dea85c740a2 (diff)
downloadkutter-96795def9c90276bcf3ea00d2292002237363ed6.tar.gz
kutter-96795def9c90276bcf3ea00d2292002237363ed6.tar.xz
kutter-96795def9c90276bcf3ea00d2292002237363ed6.zip
led: Add support for PWM controlled LEDs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'docs/Config_Reference.md')
-rw-r--r--docs/Config_Reference.md140
1 files changed, 82 insertions, 58 deletions
diff --git a/docs/Config_Reference.md b/docs/Config_Reference.md
index 7fca3797..d8096a6f 100644
--- a/docs/Config_Reference.md
+++ b/docs/Config_Reference.md
@@ -2505,45 +2505,44 @@ with the SET_FAN_SPEED [gcode command](G-Codes.md#fan_generic).
# See the "fan" section for a description of the above parameters.
```
-## Additional servos, LEDs, buttons, and other pins
+## LEDs
-### [servo]
+### [led]
-Servos (one may define any number of sections with a "servo"
-prefix). The servos may be controlled using the SET_SERVO
-[g-code command](G-Codes.md#servo). For example: SET_SERVO
-SERVO=my_servo ANGLE=180
+Support for LEDs (and LED strips) controlled via micro-controller PWM
+pins (one may define any number of sections with an "led" prefix). See
+the [command reference](G-Codes.md#led) for more information.
```
-[servo my_servo]
-pin:
-# PWM output pin controlling the servo. This parameter must be
-# provided.
-#maximum_servo_angle: 180
-# The maximum angle (in degrees) that this servo can be set to. The
-# default is 180 degrees.
-#minimum_pulse_width: 0.001
-# The minimum pulse width time (in seconds). This should correspond
-# with an angle of 0 degrees. The default is 0.001 seconds.
-#maximum_pulse_width: 0.002
-# The maximum pulse width time (in seconds). This should correspond
-# with an angle of maximum_servo_angle. The default is 0.002
-# seconds.
-#initial_angle:
-# Initial angle (in degrees) to set the servo to. The default is to
-# not send any signal at startup.
-#initial_pulse_width:
-# Initial pulse width time (in seconds) to set the servo to. (This
-# is only valid if initial_angle is not set.) The default is to not
-# send any signal at startup.
+[led my_led]
+#red_pin:
+#green_pin:
+#blue_pin:
+#white_pin:
+# The pin controlling the given LED color. At least one of the above
+# parameters must be provided.
+#cycle_time: 0.010
+# The amount of time (in seconds) per PWM cycle. It is recommended
+# this be 10 milliseconds or greater when using software based PWM.
+# The default is 0.010 seconds.
+#hardware_pwm: False
+# Enable this to use hardware PWM instead of software PWM. When
+# using hardware PWM the actual cycle time is constrained by the
+# implementation and may be significantly different than the
+# requested cycle_time. The default is False.
+#initial_RED: 0.0
+#initial_GREEN: 0.0
+#initial_BLUE: 0.0
+#initial_WHITE: 0.0
+# Sets the initial LED color. Each value should be between 0.0 and
+# 1.0. The default for each color is 0.
```
### [neopixel]
Neopixel (aka WS2812) LED support (one may define any number of
-sections with a "neopixel" prefix). One may set the LED color via
-"SET_LED LED=my_neopixel RED=0.1 GREEN=0.1 BLUE=0.1" type extended
-[g-code commands](G-Codes.md#neopixel).
+sections with a "neopixel" prefix). See the
+[command reference](G-Codes.md#led) for more information.
```
[neopixel my_neopixel]
@@ -2561,17 +2560,14 @@ pin:
#initial_GREEN: 0.0
#initial_BLUE: 0.0
#initial_WHITE: 0.0
-# Sets the initial LED color of the Neopixel. Each value should be
-# between 0.0 and 1.0. The WHITE option is only available on RGBW
-# LEDs. The default for each color is 0.
+# See the "led" section for information on these parameters.
```
### [dotstar]
Dotstar (aka APA102) LED support (one may define any number of
-sections with a "dotstar" prefix). One may set the LED color via
-"SET_LED LED=my_dotstar RED=0.1 GREEN=0.1 BLUE=0.1" type extended
-[g-code commands](G-Codes.md#neopixel).
+sections with a "dotstar" prefix). See the
+[command reference](G-Codes.md#led) for more information.
```
[dotstar my_dotstar]
@@ -2582,13 +2578,14 @@ clock_pin:
# The pin connected to the clock line of the dotstar. This parameter
# must be provided.
#chain_count:
+# See the "neopixel" section for information on this parameter.
#initial_RED: 0.0
#initial_GREEN: 0.0
#initial_BLUE: 0.0
-# See the "neopixel" section for information on these parameters.
+# See the "led" section for information on these parameters.
```
-### [PCA9533]
+### [pca9533]
PCA9533 LED support. The PCA9533 is used on the mightyboard.
@@ -2602,34 +2599,61 @@ PCA9533 LED support. The PCA9533 is used on the mightyboard.
#i2c_speed:
# See the "common I2C settings" section for a description of the
# above parameters.
-#initial_RED: 0
-#initial_GREEN: 0
-#initial_BLUE: 0
-#initial_WHITE: 0
-# The PCA9533 only supports 1 or 0. The default is 0. On the
-# mightyboard, the white led is not populated.
-# Use GCODE to modify led values after startup.
-# set_led led=my_pca9533 red=1 green=1 blue=1
+#initial_RED: 0.0
+#initial_GREEN: 0.0
+#initial_BLUE: 0.0
+#initial_WHITE: 0.0
+# See the "led" section for information on these parameters.
```
-### [PCA9632]
+
+### [pca9632]
PCA9632 LED support. The PCA9632 is used on the FlashForge Dreamer.
```
[pca9632 my_pca9632]
scl_pin:
-# The SCL "clock" pin. This parameter must be provided.
+# The SCL "clock" pin. This parameter must be provided.
sda_pin:
-# The SDA "data" pin. This parameter must be provided.
-#initial_RED: 0
-#initial_GREEN: 0
-#initial_BLUE: 0
-#initial_WHITE: 0
-# PCA9632 supports individual LED PWM.
-# Values range from 0.0 to 1.0. The default is 0.0.
-# On the FlashForge Dreamer, the white led is not populated.
-# Use GCODE to modify led values after startup.
-# set_led led=my_pca9632 red=1.0 green=1.0 blue=1.0 white=0.0
+# The SDA "data" pin. This parameter must be provided.
+#initial_RED: 0.0
+#initial_GREEN: 0.0
+#initial_BLUE: 0.0
+#initial_WHITE: 0.0
+# See the "led" section for information on these parameters.
+```
+
+## Additional servos, buttons, and other pins
+
+### [servo]
+
+Servos (one may define any number of sections with a "servo"
+prefix). The servos may be controlled using the SET_SERVO
+[g-code command](G-Codes.md#servo). For example: SET_SERVO
+SERVO=my_servo ANGLE=180
+
+```
+[servo my_servo]
+pin:
+# PWM output pin controlling the servo. This parameter must be
+# provided.
+#maximum_servo_angle: 180
+# The maximum angle (in degrees) that this servo can be set to. The
+# default is 180 degrees.
+#minimum_pulse_width: 0.001
+# The minimum pulse width time (in seconds). This should correspond
+# with an angle of 0 degrees. The default is 0.001 seconds.
+#maximum_pulse_width: 0.002
+# The maximum pulse width time (in seconds). This should correspond
+# with an angle of maximum_servo_angle. The default is 0.002
+# seconds.
+#initial_angle:
+# Initial angle (in degrees) to set the servo to. The default is to
+# not send any signal at startup.
+#initial_pulse_width:
+# Initial pulse width time (in seconds) to set the servo to. (This
+# is only valid if initial_angle is not set.) The default is to not
+# send any signal at startup.
```
### [gcode_button]