good video. I am looking into getting a Pi to control 10 LED's at different PWM frequencies (10-1500Hz). so each LED will be running at a different Frequency. can this be achieved with the Pi? ( tried using 555 timer oscillators but the frequency is not accurate enough for my application. Cheers
so this will work in combination with your RGB LED tutuorial, right? but can this also work with LED strips? and could you please do a tutorial on that?
Thanks. Exactly what I was looking for. Question: What if I wanted to increment (i in range) in "2s or 5s" to speed up fade. How would I go about this? Thanks
Hi, have you tried looking at (oscilloscope) the PWM resolution PI can sweep? can it sweep a PWM at divisible of less than 1 micro seconds or say in nano seconds.? IThanks nice video.
So it is possible to control a group of cree xm-l LEDs using meanwell drivers that utilize PWM to control the brightness? How do you set it up so I can have a sunrise/sunset effect on a fish tank?
Hi, Thank you for making the tutorial that seems to be the only one that actually works! However, I have noticed that the LED will suddenly change from High to Low, rather than a nice slow transition... any suggestions? Many Thanks, Sam
Yeah, that's the issue with software PWM. If you check out my video on controlling a servo with PWM, you'll see that it behaves erratically when the program is busy.
Great tutorials for the Pi but i'm having trouble with PWM. my code seems to be in tact, but when when I attempt to run it I get an attribute error on this line: p= GPIO.PWM(7, 50) The error says: AttributeError: 'module' object has no attribute 'PWM' I've tried re installing python, and even re flashing the SD card all together, but nothing seems to work. Please help
With higher Frequency the LED doesn't look like it flashes really fast. The Duty Cycle defines how long the signal is on. In the end, how bright your LED glows.
Hi, Just tried that and have an error at line 15 the marker is under the 'i'. I have reinserted the 'i' but the error persists. Can someone offer some help please?
please help, in this code what do i have to modify to light up 2 leds 16+18 let's say import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BOARD) GPIO.setup(16, GPIO.OUT) p = GPIO.PWM(16, 500) p.start(0) try: while True: for i in range(100): p.ChangeDutyCycle(i) time.sleep(0.03) time.sleep(5) for i in range(101): p.ChangeDutyCycle(100-i) time.sleep(0.03) time.sleep(5) except Keyboardlnterrupt: pass p.stop()
Very Good, your explanation is clean.
good explanation, time to start using PWM for visual feedback in some of my applications.
Thanks for the great video.
Brilliantly explained!! Your videos have been greatly helpful. Thanks!
So nice of you, i meant your explanation and illustration
Great. Thanks for this. Your vids are always easy to follow.
good video. I am looking into getting a Pi to control 10 LED's at different PWM frequencies (10-1500Hz). so each LED will be running at a different Frequency. can this be achieved with the Pi? ( tried using 555 timer oscillators but the frequency is not accurate enough for my application. Cheers
Great info. This will work for my application perfectly. Thanks for sharing!
so this will work in combination with your RGB LED tutuorial, right?
but can this also work with LED strips? and could you please do a tutorial on that?
If you're LED Strip has Infrared control, I would just use that.
If not, you can use some Transistors to switch the high current for the Strip.
Thanks. Exactly what I was looking for. Question: What if I wanted to increment (i in range) in "2s or 5s" to speed up fade. How would I go about this? Thanks
Its cool to know that he don't answer questions
Hi, have you tried looking at (oscilloscope) the PWM resolution PI can sweep? can it sweep a PWM at divisible of less than 1 micro seconds or say in nano seconds.? IThanks nice video.
Thanks for explaining that
Im getting an error with the except keyboardinterrupt thing
Any help?
So it is possible to control a group of cree xm-l LEDs using meanwell drivers that utilize PWM to control the brightness?
How do you set it up so I can have a sunrise/sunset effect on a fish tank?
Hi,
Thank you for making the tutorial that seems to be the only one that actually works!
However, I have noticed that the LED will suddenly change from High to Low, rather than a nice slow transition... any suggestions?
Many Thanks,
Sam
excellent video!!!! explained very well!! thank you
Yeah, that's the issue with software PWM. If you check out my video on controlling a servo with PWM, you'll see that it behaves erratically when the program is busy.
Gaven,
I really like your videos.
Could you please do a video on Pi-Blaster(PWM)?
Great tutorials for the Pi but i'm having trouble with PWM. my code seems to be in tact, but when when I attempt to run it I get an attribute error on this line:
p= GPIO.PWM(7, 50)
The error says:
AttributeError: 'module' object has no attribute 'PWM'
I've tried re installing python, and even re flashing the SD card all together, but nothing seems to work. Please help
is there a similar way to do this in c/c++ ??
What are those strange right angle things that I can't find on my keyboard that look a bit like full stops?
Hy, great Video can also make a duty Cycle of "7.5%"???
Can I use multiple GPIO pins as PWM pins in order to control multiple LEDs??
Will it cause any problem?
My sister has a duty cycle of 50%, since she's high 50% of the time.
Only 50%?
Great video! Thanks for sharing
But if you run other programms on the Raspy, and theyre laggin, the PWM is incorrect, right?
Yep, you can use software PWM on multiple GPIO pins without worry.
How whould i stop the dim with a command? like if I want to stop it dimming instead of keybord interupt.
expecting more videos on NTC thermistor, 555timer, PNP, NPN etc. Thank you..
How can ı give power as an output just for a predefined time ?
In the same code, I see the same affect even if the frequency is 100. what is the relation between frequency and duty cycle?
With higher Frequency the LED doesn't look like it flashes really fast.
The Duty Cycle defines how long the signal is on. In the end, how bright your LED glows.
This Video is brillant
Hi,
Just tried that and have an error at line 15 the marker is under the 'i'. I have reinserted the 'i' but the error persists. Can someone offer some help please?
Hi Gaven, need help. Shows error.
Traceback (most recent call last):
File "dim_led.py", line 9, in
p = start(0)
NameError: name 'start' is not defined
Rakesh Anand
Wont help YOU anymore, but perhaps people who r still watching this
I t ' s. p.start(0)
w i t h a d o t
i like the vid. thanks. pls upload more. thanks a lot.
will it damage the LED (faster)?
no
This won't even damage a normal bulb.
please help, in this code what do i have to modify to light up 2 leds 16+18 let's say
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
GPIO.setup(16, GPIO.OUT)
p = GPIO.PWM(16, 500)
p.start(0)
try:
while True:
for i in range(100):
p.ChangeDutyCycle(i)
time.sleep(0.03)
time.sleep(5)
for i in range(101):
p.ChangeDutyCycle(100-i)
time.sleep(0.03)
time.sleep(5)
except Keyboardlnterrupt:
pass
p.stop()
You set up the second LED and add it to the For loops?