Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  
  3. */
  4. const int speakerPin = 7;
  5. int frequencies[8] = {262, 294, 330, 349, 392, 440, 494, 523};
  6. int testFrequencies[20] = {50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
  7.  
  8. void setup() {
  9.     pinMode(speakerPin, OUTPUT);
  10. }
  11.  
  12. void loop() {
  13.     for (int i = 0; i < 20; i++) {
  14.       tone(speakerPin, testFrequencies[i], 200);
  15.       delay(200);
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement