reaktor France Asked May 2014 — Edited May 2014 Resolved by Rich! How To Gradually Increase And Lower The Value Of Pwm Hello, I would like to gradually increase and lower the value of PWM. Does anyone know how to do? thank you
Rich United Kingdom #1 May 2014 You could script it quite easily.Code:$pwm_target = 100 # Set for target speed$pwm_start = 0 # Set for start speedPWM(D0,$pwm_start):loopIF(GetPWM(D0) < $pwm_target) PWM(D0,$pwm_start) $pwm_start= $pwm_start + 5 # Change 5 to required amount for speed of increaseELSE Halt() # PWM at required level, stop script.ENDIFSleep(10) # Change sleep to suit speed.GOTO(loop)Apologies if the code is a bit messy and not explained too well I'm strapped for time but it should give an idea (hopefully)
DJ Sures PRO Synthiam #3 May 2014 Or you can servospeed() command. It applies to PWM as wellfor exampleCode:ServoSpeed(d0, 4)PWM(d0, 5)Sleep(3000) PWM(d0, 90)
Rich United Kingdom #4 May 2014 Even I learn something new from time to time, I did not know ServoSpeed() applied to PWM too, that's much easier
Code:
Apologies if the code is a bit messy and not explained too well I'm strapped for time but it should give an idea (hopefully)
for example
Code: