put 2 programs in 1 single Arduino card

Hello
I would like to know how to put 2 programs in 1 single Arduino card?

You need to merge those 2 in a single one, which will have only one setup and one loop. Remove all duplicate definitions or declarations.
Remember to use CTRL T in the IDE to auto-format the code, so it's easier to read and debug.

Ok but I ask this, because I can not put my two programs in 1

Explain more: why can't you?

Because reuniting the two programs Flowcode V6 is too complicated

You can NOT have two sketches on the Arduino at once. How would it know which you wanted to execute at any given time.

Flowcode V6 is too complicated

That's a good reason to quit using it.

lesept:
Remove all duplicate definitions or declarations.

That's the easy part :wink:

Let's say we had two sketches from the IDE File > Examples. Let's say the first program was Blink, the one WITH delay, and and the other was Digital Read Serial which reads a pin and displays the result.

To get any kind of decent response to the switch, you would really need to ditch Blinky-thinking in favour of Blink WithOut Delay.

So it's not always going to be a simple thing to do: there may often be some redesign to do. First prize of course, is to design each sketch in anticipation of its final use.

What's Flowcode, anyway?

What's Flowcode, anyway?

Probly one of them "here, let me do it FOR you" helpers that only takes 3 times the memory, storage and only slows your processor down by 60%. :slight_smile:

Flowcode is a graphical development environment for microcontrollers. Its user interface uses drag-and-drop function blocks to allow inexperienced users to create complex electronic systems and simulate them.

Sorry, the following link is in French

lesept:
Sorry, the following link is in French

In English:

If you want to use kiddie tools to write code then you are limited to kiddie projects. When you grow up and learn to actually write code then you can do anything you want.

Oh no, it's not a kiddie tool. It says right on their website that "Engineers use Flowcode..." :stuck_out_tongue:

Should be possible, just take an unused input pin, read it at the beginning of the loop (or in setup, if its a one-time decision at startup), if LOW execute program 1, if HIGH execute program 2. Still have to make sure nothing conflicts in programs, and probably best to use as a one-time decision at startup.

You could do a Google search
https://www.google.com/search?ie=UTF-8&oe=UTF-8&q=combining+sketches&domains=https%3A%2F%2Fforum.arduino.cc&sitesearch=https%3A%2F%2Fforum.arduino.cc

outsider:
Probly one of them "here, let me do it FOR you" helpers that only takes 3 times the memory, storage and only slows your processor down by 60%. :slight_smile:

Probly one of them "Hi, I speak to say nothing", and rapel you who is the evil falls into ravine