Go Down

Topic: Kill some ears! (Have spare PIezos? Upload this code!) (Read 783 times) previous topic - next topic

arduino5

5 sec in > Annoyance
1 min in > Painfull ears
5 min in > Head acke
10 min in > Fatigue (After it is turned off, its like you get head slapped.)

Use at your own responsibility.

Code: [Select]
  //Anoy-a-tron
  int flag = 1;
  if(flag==1){
    flag = 0;
  }else{
    flag = 1;
  }
 
  //Hi-Freq Buzzer Cannon
  tone(8, 10000 + (flag * 4000));
  tone(9, 12000 + (flag * 4000));
  tone(10,14000 + (flag * 4000));
  tone(11,16000 + (flag * 4000));
 
  delay(200);

el_supremo

Fortunately for my ears, that won't compile because it isn't a complete sketch.

Pete
Don't send me technical questions via Private Message.

arduino5


330R

May I ask what the use for such a thing is supposed to be?


Go Up