pulse width modulation help
jive turkey
Posts: 2
i need help with pulse width modulation
i am a beginner at programming and i have a light display wich my teacher believes some outputs turn on too quickly so he told me about pulse width modulation which would turn the led on slowly
what i would like is·the easiest subroutine possible becasue right now my program says
··HIGH· sparks
· PAUSE 1500
but he would like the led to turn on a lot slower, i havnt gotten far enough to figure out how to do that so if anybody could help it would be greatly appreciated
i am a beginner at programming and i have a light display wich my teacher believes some outputs turn on too quickly so he told me about pulse width modulation which would turn the led on slowly
what i would like is·the easiest subroutine possible becasue right now my program says
··HIGH· sparks
· PAUSE 1500
but he would like the led to turn on a lot slower, i havnt gotten far enough to figure out how to do that so if anybody could help it would be greatly appreciated
Comments
For brightness = 0 to 255
PWM sparks, brightness, 16{an arbitrary # to be the duration of the pulse}
Next
High sparks
pause 1500
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔