From 0cae62be43a28c26f4d6b3bb60f3cc18f3cd3ea0 Mon Sep 17 00:00:00 2001 From: Brady Hurlburt Date: Fri, 6 May 2016 13:13:12 -0400 Subject: [PATCH] Update README.rst --- README.rst | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.rst b/README.rst index 4a5b220..24ea3c7 100644 --- a/README.rst +++ b/README.rst @@ -79,6 +79,24 @@ Detecting events:: #set polarity to 1 on start: PWM.start("PWM0", 50, 2000, 1) + +**SOFTPWM**:: + + import CHIP_IO.SOFTPWM as PWM + #PWM.start(channel, duty, freq=2000, polarity=0) + #duty values are valid 0 (off) to 100 (on) + #you can choose any pin + PWM.start("XIO-P7", 50) + PWM.set_duty_cycle("PWM0", 25.5) + PWM.set_frequency("PWM0", 10) + + PWM.stop("PWM0") + PWM.cleanup() + + #set polarity to 1 on start: + PWM.start("PWM0", 50, 2000, 1) + +Use SOFTPWM at low speeds (hundreds of Hz) for the best results. Do not use for anything that needs high precision or reliability. **ADC**::