Questions tagged [sine-wave]

A sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation.

A sine wave or sinusoid is a mathematical curve that describes a smooth periodic oscillation.

6 questions
2
votes
1 answer

Continous running light with fading trail

In examples of FastLED library, there's the animation of a dot sweeping back and forth, with fading trails (file "DemoReel100", animation "sinelon"). How can I alter the code so instead of moving back, the dot begins at LED #1 again; so when using a…
Madamadam
  • 121
  • 3
1
vote
2 answers

Translating PIC PWM settings to ATMega328P

I'm trying to get some C code that runs on a PIC18F, working on an Arduino '328P. It uses an 8-bit timer, PWM, and a LUT to generate sine waves. I hope to get it going using Timer2 on a Nano. The PIC code is from this blog post by Roman Black. I…
Jim Mack
  • 269
  • 6
  • 14
1
vote
2 answers

Arduino Due generate 400KHz sine waze

I new in Arduino environment. Found some code generate sine wave but frequency between 14kHz to 84kHz. URL is https://www.instructables.com/SineWave-Generator-for-Arduino-DUE/ I need to generate sine waze 400kHz frequency. Output should be on DAC0…
Wan Aideed
  • 11
  • 2
1
vote
0 answers

Creating a sine with PWM Arduino DUE

I've been trying to create a sine wave using the pwm function of the Arduino DUE. The sine wave has te be at higher rates than the analogWrite() function can handle, so I've been using the native capabilties of the SAM3X8E. To test it, instead of…
0
votes
1 answer

How to make a stepper motor's speed follow a sine wave

I'm trying to have the rotational speed of a stepper follow that of a sine wave with a period of x seconds. So it starts at a speed of 0 at 0°, picks up and peaks at 90°, slows back down to 0 at 180°, back up to peak speed at 270°, and back to 0 at…
Dezcat
  • 11
-1
votes
1 answer

Generate a sine wave with a predefined frequency and amplitude via DAC0 or DAC1 with Arduino Due

Good Morning to everyone, I am a PhD Student in experimental fluid mechanics at the University of Naples "Federico II", Italy. I am working on Arduino Due card and i am novel in applications using it. First, I need to generate a sine wave with…