I had one .ino file open and wanted to run another similar code. I opened the other one while this first one was open and it somehow got integrated in the first one, so that now when I open one of them , the other also opens.
I tried to cut them and paste in another folder, but now when I want to open each of them Arduino asks me to create a folder with the file's name and move it to that folder. How could I move them back to the same folder without them being dependent ?
The arduino IDE will open all files with the extensions *.ino, *.c, *.cpp, *.h, *.hpp and *.S in the folder containing the *.ino file you opened.
Farzadtb:
I tried to cut them and paste in another folder, but now when I want to open each of them Arduino asks me to create a folder with the file's name and move it to that folder.
Say your two ino-files are named motor.ino and radio.ino. To separate them, create two folders named motor and radio and place the respective ino files into them. That should do the trick.
Let's suppose that the two files are named foo.ino and bar.ino. I assume that they are both on the same folder, either named foo or bar
Create a new folder with the other name and move the .ino file with the same name into it. You will now have a folder named foo with foo.ino in it and a folder named bar with a file named bar.ino in it. Either file may be opened independently
Thank you so much, just one more question, if they open together in Arduino, will that cause they upload together into Arduino board and cause overwriting issues ?
No, because when opening the two ino-files, you create two instances of the arduino IDE. The IDE will only compile the files present in the tabs and upload the resulting binary to the arduino.
Further to that, if you want to test say 2 sketches at the same time (transmit and receive, perhaps) on 2 different ports and maybe even with 2 different Arduino board types you can do that by manually opening the second instance of the IDE instead of doing File/Open. You can then define the port and board type separately for each instance, whereas if you do File/Open for the second file then both copies of the IDE will use the same port and board.