I am trying to alter the volume between many different tones.
I do not need to turn the volume level up, just some tones need to be much quieter.
here is a snippet of my sketch:
void setup()
{
pinMode(TICK_PIN,OUTPUT);
for(int i = 0;i < 5;i++)
tone(TICK_PIN,200,5); //pitch,duration
delay(500);
tone(TICK_PIN,1000,5); //pitch,duration
delay(500);
I am using an Arduino Mega, and I am powering an 8ohm speaker with an LM386 op amp.
I can control total volume of all the notes, but would like to lower some and keep others at the regular volume.
Thank you to all who have helped me out so far, much appreciated!