I just wonder how this work. If i put in "void firstsetup()" and put som code inside before the ordinary "void setup()". Will "void firstsetup()" run first before "void setup()"?
Will "void firstsetup()" run first before "void setup()"?
No
setup() will run first wherever you put it in the program then loop() will run repeatedly wherever you put it in the program
You could call firstsetup() as the first thing in setup() if you really wanted to, but what is it that you are trying to do ?
firstsetup() is not part of the Arduino language -> Arduino Reference - Arduino Reference
This means, that you can have a function with the name firstsetup(), of course. But you will have to call it yourself. So the answer to your question would be: setup() is always first.
Ok, thanks for clarifying
This reminds me of something I recently did in C, but as I don't know what you are doing I don't know if it's the same or even relevant. Maybe the answers you have are enough for you, but if not then it helps to explain more about what you want to achieve.
PerryBebbington:
This reminds me of something I recently did in C, but as I don't know what you are doing I don't know if it's the same or even relevant. Maybe the answers you have are enough for you, but if not then it helps to explain more about what you want to achieve.
I do not want to achieve anything really. I just wondered