Is it possible to pigyback three programs on the Ardunio?

Electronics Computer Programming Q&A
Post Reply
frank_fg
Posts: 23
Joined: Tue Apr 29, 2008 9:07 am
Contact:

Is it possible to pigyback three programs on the Ardunio?

Post by frank_fg »

:smile:
Hi!

I would like to have three programs runing on the Ardunio one after the other or one at a time, in different order.
Is that possible?

Thanks new to programing.

Frank G.
User avatar
jwax
Posts: 2234
Joined: Mon Feb 09, 2004 1:01 am
Location: NY
Contact:

Re: Is it possible to pigyback three programs on the Ardunio

Post by jwax »

Hi Frank. I don't think "playback" is the correct terminology for these things called microcontrollers.
I'm new to them too, and came here with my own question about them, but will start a new thread for that.
I believe it is possible to "stage" programs in that one sketch can have in it another sketch, and another, etc. One big sketch, or program, which contains other sketches. In other words, you can have as many "if, then" statements as you need (within reason- limited by on chip memory).

There's loads of Arduino forums and tutorials online. Best of luck to you!

John
WA2RBA
dobrien
Posts: 37
Joined: Thu May 15, 2008 6:01 am
Contact:

Re: Is it possible to pigyback three programs on the Ardunio

Post by dobrien »

The term is called multitasking.
Arduino has library call a Scheduler.
You can search the web site for
further information or examples.
User avatar
jwax
Posts: 2234
Joined: Mon Feb 09, 2004 1:01 am
Location: NY
Contact:

Re: Is it possible to pigyback three programs on the Ardunio

Post by jwax »

Thanks dobrien, very cool!
WA2RBA
Rodney
Posts: 162
Joined: Sat Aug 31, 2002 1:01 am
Location: Titusville, FL USA
Contact:

Re: Is it possible to pigyback three programs on the Ardunio

Post by Rodney »

Yes, just make the 2nd and 3rd program as programs that you call from the main program or, make each of the three programs as separate programs that you call from a master program. This is like using Gosubs in basic. You can make use of the "if,then" or "else" type functions to set them up to run in any manner you desire.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests