Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [analogwrite]

The analogWrite() function is used to generate a PWM (Pulse Width Modulation) output signal on compatible pins.

5
votes
1answer
990 views

Why does an LED sometimes flash when increasing brightness?

This is admittedly a cross-post from LED fade malfunction (random flash) but I can't get an answer on the Arduino forum. I was mucking around with some very basic code and I noticed that when ...
0
votes
2answers
2k views

It is possible to control brightness of an LED strip (connected using a relay and having a seperate power supply ) using output from an arduino?

The circuit contains a relay interfacing with 12v power supply and LED strip. Can the brightness for this strip of LEDs be controlled using the analogWrite command? This works perfectly for a single ...
4
votes
3answers
16k views

Sending a value from one arduino to another

I wonder if it is possible to send a value from one arduino to another. Basically, I have one arduino measuring let's say weight, but I want to display that value using an lcd in another arduino. ...
18
votes
2answers
22k views

Why do some pins have a different PWM frequency?

According to the Arduino reference for analogWrite(), the PWM frequency on most pins is ~490 Hz. However, it's ~980 Hz for pins 5 and 6 on the Uno, and for pins 3 and 11 on the Leonardo. Why are ...
2
votes
3answers
7k views

Why does a Piezo Buzzer not require a PWM digital pin (Gallileo Gen2)?

According to my current (poor) understanding, only the PWM pins (with the ~) among the digital pins (ignoring Analog pins) can be passed to analogWrite(). I understand the servo therefore - since ...