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

Fixes gpio name in SOFTPWM examples

This commit is contained in:
Brady L. Hurlburt
2016-05-09 18:33:48 +00:00
parent 3c912ecb72
commit bfb660e371

View File

@ -79,7 +79,7 @@ Detecting events::
#set polarity to 1 on start: #set polarity to 1 on start:
PWM.start("PWM0", 50, 2000, 1) PWM.start("PWM0", 50, 2000, 1)
**SOFTPWM**:: **SOFTPWM**::
import CHIP_IO.SOFTPWM as PWM import CHIP_IO.SOFTPWM as PWM
@ -87,15 +87,15 @@ Detecting events::
#duty values are valid 0 (off) to 100 (on) #duty values are valid 0 (off) to 100 (on)
#you can choose any pin #you can choose any pin
PWM.start("XIO-P7", 50) PWM.start("XIO-P7", 50)
PWM.set_duty_cycle("PWM0", 25.5) PWM.set_duty_cycle("XIO-P7", 25.5)
PWM.set_frequency("PWM0", 10) PWM.set_frequency("XIO-P7", 10)
PWM.stop("PWM0") PWM.stop("XIO-P7")
PWM.cleanup() PWM.cleanup()
#set polarity to 1 on start: #set polarity to 1 on start:
PWM.start("PWM0", 50, 2000, 1) PWM.start("XIO-P7", 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. Use SOFTPWM at low speeds (hundreds of Hz) for the best results. Do not use for anything that needs high precision or reliability.
**ADC**:: **ADC**::