1
0
mirror of https://github.com/xtacocorex/CHIP_IO synced 2025-07-20 04:43:21 +00:00

Update README.rst

This commit is contained in:
Brady Hurlburt
2016-05-06 13:13:12 -04:00
committed by Brady L. Hurlburt
parent 67dd919fed
commit 0cae62be43

View File

@ -80,6 +80,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**::
Not Implemented yet