CherryCHTR
CherryCHTR

Reputation: 13

Make PWM signal with arduino

First sorry for my bad English and I hope u understand what I mean

I want make a PWM signal with 50% duty cycle and (f) frequency (f is an integer)

for example make 50hz signal when f=50 and 2000hz signal when f=2000

how can I do it ????

Upvotes: 0

Views: 255

Answers (1)

aMike
aMike

Reputation: 937

If that's all you need to do, then the tone() function does it. Read the language reference and get familiar with all it has for you. Have fun!

https://www.arduino.cc/reference/en/language/functions/advanced-io/tone/

Upvotes: 1

Related Questions