Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- */
- const int speakerPin = 7;
- int frequencies[8] = {262, 294, 330, 349, 392, 440, 494, 523};
- int testFrequencies[20] = {50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000};
- void setup() {
- pinMode(speakerPin, OUTPUT);
- }
- void loop() {
- for (int i = 0; i < 20; i++) {
- tone(speakerPin, testFrequencies[i], 200);
- delay(200);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement