Go Down

Topic: Multiple Program Arduino/Processing Question! (Read 1 time) previous topic - next topic


For an xmas project I would like to combine all three of the following projects (Links below) to only 1 arduino and 1 computer. The wiring is not a problem, the programming is. Is this even possible? If yes, how can I do it?
P.S. I have an arduino duemilanove



Tnx gaiz!
<3 Buzz


Assuming the combined memory requirements are not too great for a single processor, and you have a means of selection which you want to run, I don't think there are too many difficulties.

Start by putting the code from each sketch's "loop" into a separate function, modify the new "loop" to call one based on the selection mechanism,  and see where you get to.

Come back if you have any specific questions.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.


I need to run them all simultaniously, along with their respective processing and computer commands.


I need to run them all simultaniously

Your idea of simultaneous and the Arduino's idea of simultaneous may not be the same thing. Ringing a bell every half hour does not require critical timing.

Reacting to serial commands is also not a highly time-critical application. If you miss by 10 or 20 clock cycles, when a clock cycle completes in 62.5 nanoseconds, are you going to be able to detect that?

Neither of there functions will tax the Arduino.

Making LEDs flash to music, on the other hand, will. Processing the serial data and ringing the bells, will cause the LEDs to have issues when the other functions need to do stuff.

Whether you will even notice, though, is hard to say. Is it critical? Of course not.
The art of getting good answers lies in asking good questions.

Go Up