Tone
Tone copied to clipboard
Error using Arduino IDE 2.1.0
Below is the error I get for the example ToneTest without any changes to code:
C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:11:17: error: 'NOTE_A3' was not declared in this scope int notes[] = { NOTE_A3, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:12:17: error: 'NOTE_B3' was not declared in this scope NOTE_B3, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:13:17: error: 'NOTE_C4' was not declared in this scope NOTE_C4, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:14:17: error: 'NOTE_D4' was not declared in this scope NOTE_D4, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:15:17: error: 'NOTE_E4' was not declared in this scope NOTE_E4, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:16:17: error: 'NOTE_F4' was not declared in this scope NOTE_F4, ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:17:17: error: 'NOTE_G4' was not declared in this scope NOTE_G4 }; ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:20:1: error: 'Tone' does not name a type Tone notePlayer[2]; ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde: In function 'void setup()': C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:25:3: error: 'notePlayer' was not declared in this scope notePlayer[0].begin(11); ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde: In function 'void loop()': C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:40:9: error: 'notePlayer' was not declared in this scope notePlayer[0].play(notes[c - 'a']); ^ C:\Users\popey\AppData\Local\Temp.arduinoIDE-unsaved202343-1564-pbuhxs.f1njr\ToneTest\ToneTest.pde:57:28: error: 'NOTE_B2' was not declared in this scope notePlayer[0].play(NOTE_B2); ^
exit status 1
Compilation error: 'NOTE_A3' was not declared in this scope