sinus wave generator

Hallo Arduino users,

I am a user of arduino's ONE , not a programmer, sorry.

I am now looking for a sketch of a sinus wave generator ( between 10 and 2000Hz.)

The frequentie must be controled, simple by a separate potentiometer.

Who could help me, or help me finding a site where such a thing is available.

Please reakt to zhtech@zhtech.nl , I am very greatfull for help.

greetings.

Bob

The Arduino can't put out a sine wave because it has no analog output.

What's the application? How good does the sine wave have to be?

You can approximate analog with [u]PWM[/u] and if you connect a filter to the Arduino's output you can get close to a sine wave. But, you'll need to increase the PWM frequency because the default PWM frequency of less than 1kHz can't generate a 2kHz signal.

The frequentie must be controled, simple by a separate potentiometer.

You can connect a pot and [u]map()[/u] the ADC reading to a time variable to set the frequency and you can use the sine function or make a sine table.

If you don't know anything about digitized/sampled analog, the [u]Audacity website[/u] has a good-easy introduction.

Hallo Karma,

Thanks for replay......
It might be a square wave between 10 and 2000 hz.
I have the skill to shape it to a sine wave.

The sinus wave is used to adjust the optimum in output of a radio amateur
transmittor.

I heard from a collega...the Arduino Due can also do this job.
It's no problem to bay such a board, but than I have still the same question.....
..i need a complete working sketch wich I can directly upload.

Some one must have made a sinus generator is my thought......

greetings from Friesland
Bob

Your English is letting you down when it comes to googling.
First off it in not called a sinus wave but a sin wave.
Second it is an Arduino Uno not a ONE. Yes I know Uno means one but it is always called a Uno.

Here is one of many links you get searching for
Arduino sin wave generator

pa0zh:
I heard from a collega...the Arduino Due can also do this job.
It's no problem to bay such a board, but than I have still the same question.....
..i need a complete working sketch wich I can directly upload.

Yeeeeeeeeeees, this is the solution I am waiting for.
Thank you very much.
regards
Bob