It is currently Sun Jan 21, 2018 9:59 pm

All times are UTC - 8 hours




 Page 1 of 1 [ 5 posts ] 
Author Message
 Post subject: Is it possible to pigyback three programs on the Ardunio?
PostPosted: Thu May 08, 2014 4:46 pm 

Joined: Tue Apr 29, 2008 8:07 am
Posts: 41
: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.


Offline
 Profile Send private message  
 
 Post subject: Re: Is it possible to pigyback three programs on the Ardunio
PostPosted: Wed May 14, 2014 5:54 pm 
User avatar

Joined: Mon Feb 09, 2004 1:01 am
Posts: 2132
Location: NY
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


Offline
 Profile Send private message  
 
 Post subject: Re: Is it possible to pigyback three programs on the Ardunio
PostPosted: Wed May 28, 2014 3:40 pm 

Joined: Thu May 15, 2008 5:01 am
Posts: 41
The term is called multitasking.
Arduino has library call a Scheduler.
You can search the web site for
further information or examples.


Offline
 Profile Send private message  
 
 Post subject: Re: Is it possible to pigyback three programs on the Ardunio
PostPosted: Thu May 29, 2014 2:44 am 
User avatar

Joined: Mon Feb 09, 2004 1:01 am
Posts: 2132
Location: NY
Thanks dobrien, very cool!


Offline
 Profile Send private message  
 
 Post subject: Re: Is it possible to pigyback three programs on the Ardunio
PostPosted: Sun Jun 29, 2014 11:08 am 

Joined: Sat Aug 31, 2002 12:01 am
Posts: 168
Location: Titusville, FL USA
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.


Offline
 Profile Send private message  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron