It is the same with the board connected, but for some reason it cannot compile to the leonardo, and I don't understand the problem here. It has the same code parts, it should be good.
This line is repeated ten times at the top of Simhub_code_test.ino:
// J revision sketch
#define VERSION 'j'
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
// ---------------------------------------------------- PLEASE USE SETUP ASSISTANT AVAILABLE IN SUB FOLDER !!!! -------------------------------------------
lines?
Also, I don't have problems with the joystick library, I guess it is already installed for me from before. I only have problems with Adafruit_GFX.h but I don't need that part in my code.
Again. I don't understand what you want to say with that.
Solving your problems will be faster if you take MORE time to explain your problems in ONE posting instead of shooting multiple too short to be understandable postings.
I only have problems with Adafruit_GFX.h
saying You have a problem with Adafruit_GFX.h
but then
I don't need that part in my code
saying I don't need the Adafruit_GFX.h
Why do you have a problem with a library that you don't use???
You have to explain in detail what the problem is.
I assume you still have a problem that an compiler-error occurs
follow this tutorial to post the compiler-log that includes the errors
The All_code_from_simhub zip is all the codes that I got from the Simhub app. The Simhub_code_test zip is "my" (I will refer to it as my to understand more easily) code which is only the parts I need from the original code (I don't need displays, etc). But for some reason my code cannot compile due to something and you already figured out as you said:
with
void setup() {}
void loop() {}
the Simhub_code_test compiles
And that's why I'm asking where should I put it.
But then you also said:
the All_code_from_Simbuh.ino has a different problem
But I don't need that ino, that's just what I got from Simhub. I just responded to your answer about Joystick_ and stated I have problems with Adafruit_GFX in that code (but I don't use that part)
only in parts understandable.
You should change to a style of clearly naming what you mean every time.
Here is the modified version of what you wrote
In my modification all "that"'s all "it"'s are replaced by the very specific name each "that" / each "it" has
If you read the modified version: Does this really make sense? To me it makes no sense.
.
.
.
.
To your question
You should re-read carefully what the users here post
What is the usual place to put the void setup() and void loop() functions?
You find the void setup() and void loop() in the *.ino-file
In your case it is the already mentioned Simhub_code_test.ino-file
The position where you put the void setup() and void loop() function usually is below the #include-commands and the variable declarations.
I doubt that inserting an empty setup()-function and an empty loop()-function will create a functional code that acts as a joystick.
But with adding an empty setup()-function and an empty loop()-function into your Simhub_code_test.ino-file the Simhub_code_test.ino-file compiles.
In the above text I have consequently named each thing by its name instead of using "this", "that", "it". This writing style eliminates the room for interpretations to almost zero.
This needs a little more time to write it down but it saves time because you don't have to ask back
"what does this "that" mean ?"
If you have added the empty setup()-function and an empty loop()-function like this
void setup() {}
void loop() {}
into your Simhub_code_test.ino-file and you still have a compiler-error
adjust your Arduino-IDE-settings like described in this tutorial
Yeah, sorry, I tend to speak like everyone is a mind-reader.
I'm just confused right now to be honest.
I put the
void setup() {}
void loop() {}
lines in the Simhub_code_test.ino and it is compiles now.
I didn't want to modify anything in the Simhub_code_test.ino because those lines are the copy pastes from All_code_from_simhub.ino.
The Simhub uploaded the All_code_from_simhub.ino to my leonardo, and worked.. I don't understand how can be that the same code wrong. Is it possible that Simhub has some lines in it's own code that helps working the All_code_from_simhub.ino?
I'm testing it right now, and I'm afraid it is not enough
Is "the Simhub" a special software that is able to remotely control the arduino-IDE to upload a sketch?
Is "the Simhub" a person?
You write in a very confusing style
I suggest that you go to sleep until you can't sleep anymore and then do something that really relaxes you.
After that write a detailed description of what you have done.
I wrote somewhere above, Simhub is an application and it can upload sketches to the board. It is a big help because you don't need to code, just set everything (like button number and pin) in the program.
It is 10:11 am, I already woke up today. I cannot write a more detailed description than this. My English sucks but I think it is understandable.