Can i rename void loop() by example "void excute1()" for let run everything below void execute1 run one's.
How must i declare the value "execute1" in the heading in program?
Thanks.
Can i rename void loop() by example "void excute1()" for let run everything below void execute1 run one's.
No
As normally used the Arduino environment needs a loop() and setup() function
Why not call excute1() from loop() ?
What are you trying to do and why ?
started an training s/w arduino whit breadboard + microproc UNO and bookwork and study material. An box full whit components to build cirquits.
and build some cirquits. I'l want conditional from out structure "for" or "if" or "while do" structure 5 times run an cirquit that start leds burning. also on input from an h/w switch HIGH from breadboard input to input UNO to start the loop and run leds 5times burning. i'l have had trouble to declare the varibles correct. Ordered an new book about Arduino prgramming. started to lookup for tips on the internet,...BUt do you have an tip,..
Thanks.
If you want it to execute once, put it in setup.
As UKHeliBob previously said, the Setup() and Loop() are integral and unavoidable parts of the code.
The Setup() initialises the pins etc. , and the loop() block does the rest. However, that doesn"t mean you can't
create any other void block (void blocks are those which don't end up with giving you a value, like those if's and all).
Quintus26:
As UKHeliBob previously said, the Setup() and Loop() are integral and unavoidable parts of the code.
The Setup() initialises the pins etc. , and the loop() block does the rest. However, that doesn"t mean you can't
create any other void block (void blocks are those which don't end up with giving you a value, like those if's and all).
No, setup() and loop() are integral.
Setup() and Loop() are optional, but should be avoided.
They're not "void blocks", they're void functions.
TheMemberFormerlyKnownAsAWOL:
No, setup() and loop() are integral.
Setup() and Loop() are optional, but should be avoided.They're not "void blocks", they're void functions.
Sorry, I always get in a spot of trouble in using caps... But that is exactly what I meant.
And thanks a lot for correcting me on the spot of "blocks", an outcome of playing with Lego, but I'm just 13yr old, so not too old for Lego, is it?
Quintus26:
I'm just 13yr old, so not too old for Lego, is it?
Never too old for Lego.
the Setup() and Loop() are integral and unavoidable parts of the code.
Leaving aside the capitalisation of the function names being wrong, there is actually no requirement for a program compiled in the Arduino to have either function, but I seriously doubt whether the OP is ready for that and is better off using setup() and loop()