I am currently in the 10th class and doing my work for my exams.
I want to do build an piano. the only problem i have is with the code. everytime i want to upload it to the
arduino uno it says:
Although you may be used to sketches that only consist of a single file, the Arduino IDE also supports multi-file sketches. The sketch in that project is a multi-file sketch, but you have only loaded one of the files.
(In the Arduino IDE) Sketch > Add File > select the downloaded file > Open
In a perfect world, that would be all that was necessary. However, the Arduino Project Hub seems to mangle the file name from the correct "pitches.h" to the incorrect "pitches_h.ino", so more steps are required:
(In the Arduino IDE) Click on the "pitches_h" tab.
Click the downward pointing triangle button on the right side of the tab bar.
Click "Rename".
Rename the file to pitches.h.
Click "OK".
Now this will solve the "pitches.h: No such file or directory" error, but you will get other errors unless you also add the other files of the project.
In the "Code" section of the project, you will see multiple files listed: Song1, Song2, Song3, Song4, Song5. Click on each of those and then click the download button (looks like a downward pointing arrow going into a tray.
(In the Arduino IDE) Sketch > Add file > select the downloaded file Song1.ino > Open
Repeat for the other Song files.
You will not need to do the rename step as with pitches.h because the Arduino Project Hub didn't corrupt the names of these files.
That is very strange. I tested my instructions myself and they worked for me. I'm not using the Windows App Store version of the Arduino IDE as you are (though I am using Windows 10), but I can't imagine that would matter.
Please do this:
Sketch > Show Sketch Folder
Verify that the file in that folder is named pitches.h and now pitches.h.ino. Be aware that Windows may hide the .ino extension unless you check View > File name extensions in Windows Explorer.
If the file is named pitches.h.ino, rename it to pitches.h.
Thanks the Programm says now that it is working. (i have done what he told me to do in reply #8)
But when i upload it it doesnt work. i should be able to press exactly 2 buttons and the arduino should play a song. do i have to do everything else ?
I know how to do that but in my project i just cant find the problem.
I have already tried it to print something on the LCD i am using currently and it worked.