Problem with #include pitches.h | Piano Project

Hi everyone,

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:

Here is the current link to the project i am doing:
https://create.arduino.cc/projecthub/lindsi8784/electronic-piano-keyboard-with-preset-songs-74ee7c?ref=tag&ref_id=piano&offset=0

It would be super nice if you guys could help me.

Tanks.

(deleted)

Do you have a file named pitches.h on your PC and if so where is it located ?

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.

To add the missing pitches.h file:

  • Download the file: Arduino Project Hub
  • (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.

  • Open the project page: Arduino Project Hub
  • 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.

How why does it still not work ?
Here is the Picture how it is looking -> Imgur: The magic of the Internet

Please answer the questions that I asked in reply #2

I have done everything that guy told me to do in repy #3.
Hope u know now were i am currently

So where is your pitches.h file saved?

u-cqhlul:
How why does it still not work ?

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.

Windows may hide the .ino extension unless you check View > File name extensions in Windows Explorer.

Personally I can't imagine working without the extensions being visible

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 ?

This is what i rebuild -> Imgur: The magic of the Internet

Does the menu display on the LCD and can you move through it using the menu button ?

I recorded an video for you to see how it is "working" ->

Forget your project for now, can you print text to the LCD ?

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.

Let's start with the basics.

      int keyVal = analogRead(A0);
      Serial.println(keyVal);

What do you see when you print keyVal ?
Does it vary with each key and do the values fit into the ranges being tested in the code ?