Go Down

Topic: sub-routines HELP (Read 1 time) previous topic - next topic


hello all, i am trying to make a sub-routine i am not sure how to do this. i want to have one loop main, and only call functions. i would like to be able to re-name the functions.

For example

main loop
   call function 1
   call function 2
if anyone could help me with this that would be great.


I only provide help via the forum - please do not contact me for private consultancy.


setup() and loop() are already subroutines (called functions in C/C++), so even if you don't know it you have written functions already.

You can call functions just abot anything you want and the code will look something like this:

Code: [Select]
int function1()

int function 2()

void loop()

I am sure you get the idea. You should also look at at C/C++ tutorial as already suggested.
Arduino Libraries https://github.com/MajicDesigns?tab=Repositories
Parola for Arduino https://github.com/MajicDesigns/Parola
Arduino++ blog https://arduinoplusplus.wordpress.com

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131