Questions tagged [wave]

7 questions
2
votes
1 answer

Timer question: Phase Correct PWM at specific frequency

I am trying to create a sinusoidal wave segmented in 64 Frame, each holding a Duty cycle precisely varying from 0x00 to 0xff. This is for an Arduino Nano. I have trouble understanding the following: Which Wave Generator Mode and Matches will cause…
B7th
  • 167
  • 8
1
vote
1 answer

Square wave generator generates a shorter pulse from time to time

I am using an arduino Micro to generate 8 square waves on 8 pins. The idea is as follows: on pin 13 is the main square wave. It represents a certain BPM (beats per minute). The other 7 pins should give multiplications or divisions of that BPM. It…
Janw
  • 294
  • 1
  • 9
1
vote
2 answers

Sine wave PWM Arduino Micro

I'm trying to generate a sine wave on my Arduino micro. I used this code. int Pin = 9; void setup() { Serial.begin(9600); pinMode(Pin, INPUT); } void loop() { float something = millis()/10000.0; int value = 128.0 + 128 * sin( something * 2.0…
Ultra67
  • 111
  • 2
0
votes
1 answer

Tone() function pauses between notes

I tried to experiment with the tone() function that comes with the arduino library. I played around with the standard code example located here: https://www.arduino.cc/en/Tutorial/BuiltInExamples/toneMelody This is the code: #include…
user1584421
  • 1,425
  • 3
  • 26
  • 36
0
votes
2 answers

How do you convert PCM to PWM?

I'm a beginner and I've been developing my own library for a wave player. so far I have the SD card installed and OLED and rotary encoder all connected. I've successfully read the wave chunk and it's data(16bit and 44.1KHz). My question is that the…
Sankalp
  • 11
  • 1
  • 2
0
votes
2 answers

Testing an oscilloscope with my Arduino

I bought a very old oscilloscope and although it works, I have my doubts about refreshing the screen (the electron beam fades away very slowly or is not showing up consistently across the screen). I tested a bit with digitalWrite and anlogWrite, but…
Michel Keijzers
  • 13,014
  • 7
  • 41
  • 58
-1
votes
2 answers

Play computer *.wav files through Arduino

I am doing mice behavioral training. I have an arduino-controlled box for that. The sounds are play using Mp3 player controlled b the arduino. However, the mp3 player is not good enough for my needs. I need two clear sounds of 10 msec duration and…
user135172
  • 111
  • 1
  • 5