I put a little speaker from my Mega 2560's Pin47 (digital) and GND. When I give it the command:
pinMode(47,OUTPUT);
tone(47,440,1000);
.... I can hear the tone nice and clear, for about a second, which is what I expect. So far so good.
But when I let it execute the following series of commands, I get three notes in a row with no spaces or rests between them:
pinMode(47,OUTPUT);
tone(47,523,200); // Play a C
delay(200);
tone(47,587,200); // Play a D
delay(200);
tone(47,659,200); // Play an E
delay(200);
I would expect a brief silence (1/5 of a second long) between each note, but there is no space at all.
Anyone know why? I'm probably doing something wrong, but I'm damned if I know what.