1151Views8Replies

Author Options:

Arduino help? Answered

I want to tell the arduino to one thing while its doing something else at the same time i just dont know how to do it. im new to arduino but learning at a steady pace so please help

8 Replies

user
aelias36Best Answer (author)2011-03-27

What you want the arduino to do is called Parallel processing. Although you can't technically do it, there are some programs that can compile your code in such a way that it can emulate parallel processing.

http://concurrency.cc/

I think you'll need to learn a new programing language, if you're up for it.

Select as Best AnswerUndo Best Answer

user

what language im slowly learng c++ and c#

Select as Best AnswerUndo Best Answer

user

Actually, for the Arduino you'll probably be working in straight C, unless you drop down to assembler.

Select as Best AnswerUndo Best Answer

user

looks like im learning tranterpreter

thank you

Select as Best AnswerUndo Best Answer

user
eddevine (author)2013-11-10

The problem i'm having is that im using an arduino uno with a GPRS shield and with the code, i get a continuous sms message on my iphone that i cant stop, also when the 2 sensing wires (5v and sensor out) i have set up on the Gprs are unconnected i still get sms messages on my phone.

Select as Best AnswerUndo Best Answer

user
orksecurity (author)2011-03-27

What you'll need to do is write a single loop which performs both tasks. Whether the Arduino is fast enough to keep up with both of them will depend on what those tasks are.

Select as Best AnswerUndo Best Answer

user
orksecurity (author)orksecurity2011-03-28

Of course the other solution is two arduinos (arduinodes? arduini?). But if you want the two tasks talking to each other, that still leaves you with the obligation to write a top-level loop which manages that communications link.

Select as Best AnswerUndo Best Answer

user
7654321 (author)2011-03-27

Arduinos can't do parallel processing. This means that you can only do one thing at a time. It might be possible to use concurrency. This is what your computer does by separating programs into threads, then cycling through the threads really fast.

Select as Best AnswerUndo Best Answer