Skip to content

Conversation

@per1234
Copy link

@per1234 per1234 commented Jun 2, 2019

Arduino IDE requires that a sketch be located in a folder of the same name:

https://arduino.github.io/arduino-cli/dev/sketch-specification/#primary-sketch-file

Although the name of the repository does match the sketch name, when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/tag/commit name is appended to the folder name, causing a mismatch.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

The file "Meditation_Trainer.ino" needs to be inside a sketch folder named "Meditation_Trainer".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file Meditation_Trainer.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino: In function 'void setup()':

Meditation_Trainer:61:3: error: 'interruptSetup' was not declared in this scope

   interruptSetup();                 // sets up to read Pulse Sensor signal every 2mS

   ^~~~~~~~~~~~~~

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino:61:3: note: suggested alternative: 'interrupts'

   interruptSetup();                 // sets up to read Pulse Sensor signal every 2mS

   ^~~~~~~~~~~~~~

   interrupts

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino: In function 'void loop()':

Meditation_Trainer:73:3: error: 'serialOutput' was not declared in this scope

   serialOutput() ;

   ^~~~~~~~~~~~

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino:73:3: note: suggested alternative: 'serialVisual'

   serialOutput() ;

   ^~~~~~~~~~~~

   serialVisual

Meditation_Trainer:83:5: error: 'serialOutputWhenBeatHappens' was not declared in this scope

     serialOutputWhenBeatHappens();   // A Beat Happened, Output that to serial.

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
The Arduino IDE requires that a sketch be located in a folder of the same name. Although the name of the repository does match the sketch name, when GitHub's popular Clone or download > Download ZIP feature is used to download the contents of a repository the branch/tag/commit name is appended to the folder name, causing a mismatch.

When opening a file that does not meet this sketch/folder name matching requirement the Arduino IDE presents a dialog:

The file "Meditation_Trainer.ino" needs to be inside a sketch folder named "Meditation_Trainer".
Create this folder, move the file, and continue?

After clicking "OK" the Arduino IDE currently moves only the file Meditation_Trainer.ino to the new folder, leaving behind the other source files. This causes compilation of the sketch to fail:

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino: In function 'void setup()':

Meditation_Trainer:61:3: error: 'interruptSetup' was not declared in this scope

   interruptSetup();                 // sets up to read Pulse Sensor signal every 2mS

   ^~~~~~~~~~~~~~

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino:61:3: note: suggested alternative: 'interrupts'

   interruptSetup();                 // sets up to read Pulse Sensor signal every 2mS

   ^~~~~~~~~~~~~~

   interrupts

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino: In function 'void loop()':

Meditation_Trainer:73:3: error: 'serialOutput' was not declared in this scope

   serialOutput() ;

   ^~~~~~~~~~~~

C:\Users\per\Desktop\Meditation_Trainer-master\Meditation_Trainer\Meditation_Trainer.ino:73:3: note: suggested alternative: 'serialVisual'

   serialOutput() ;

   ^~~~~~~~~~~~

   serialVisual

Meditation_Trainer:83:5: error: 'serialOutputWhenBeatHappens' was not declared in this scope

     serialOutputWhenBeatHappens();   // A Beat Happened, Output that to serial.

     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant