Arduino ide 2- folder restriction?

Hi to all
I made new folder and copied sketch from original folder. When i try to start copied sketch i got error: sketch has to be in folder (original name).
I made new sketch, paste same code from original sketch but compiler make errors?
Any help?
Thanks

Hi @mstetic

I'm going to ask you to post some additional information that might help us to identify the problem.

:exclamation: NOTE: These instructions will not solve the problem. They are only intended to possibly gather some more information about the problem, which might provide a clue that leads to a solution.

Please do this:

  1. Select Sketch > Verify/Compile from the Arduino IDE menus.
  2. Wait for the compilation to fail.
  3. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the </> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block
  6. Press Ctrl+V.
    This will paste the compilation output into the code block.
  7. Move the cursor outside of the code tags before you add any additional text to your reply.
  8. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (image) on the post composer toolbar:
    image
  6. Select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

Thanks for advice.
Now i have original folder: Arduino\OLED\OLED_rotate\ and file inside: OLED_rotate.ino
When i select this file and press enter, ide open new window. Compiler works fine same as uploading.
I made another folder: Arduino\OLED\OLED_rotate_2\ and file inside: OLED_rotate.ino
When i select this file and press enter, ide do not do anything. OLED_rotate.ino are same file, just copied.
Please help. Do i do anything wrong?

Your new file should be in a folder of the same name. So, the file OLED_rotate_2.ino should be in a folder named OLED_rotate_2

1 Like

Thanks, now it is working. Thanks again.

This is not a feature of ide 2, it was exactly the same in ide 1.
Sketch INO-file must have the same name as a folder.

Hi
I am sending error code as you suggested me. I use 2 same heltec lora esp32 boards. Both with factory code. One board I uploaded using arduino web editor and later using arduino IDE on the macbook air. Works fine. I have tried to upload another board, which still have factory code and i got this error. Do I have to reset or erase somehow factory code? Or what?
Please help.
Thanks in advance

Last lines of errors:

Wrote 18912 bytes (13027 compressed) at 0x00001000 in 0.2 seconds (effective 670.1 kbit/s)...
File md5: 973379d879acf4aba5da9b441e44427a
Flash md5: a546f555daf5ff4e1622773bf2a2f429
MD5 of 0xFF is 4ca6a95d1789c3d6317811ab47dfa684

A fatal error occurred: MD5 of file does not match data in flash!
Failed uploading: uploading error: exit status 2

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.