forking?e

Hi, I'm more of a software developer and I'm used to using the unix pids and forks etc... :-/ So my question is: Is there a way make "forks" in Arduino's code? :-? It would be tremendously useful. :)

Keep up the good work! ;)

You mean like fork a process? I guess that would work, if there was an operating system or supervisor to monitor them.

Instead, you'll need to implement your own multitasking. On every iteration through loop(), run each "process" for a few cycles.

I was thinking that I could use another arduino and use 2 pins for semaphore and with that be able to multitask. Do you think it is possible?

I think this should be possible.

You can't 'fork' a process on the Arduino, because it has no operating system and no inter-process protection (supervisor mode, memory protection, privileged instructions). You can, however, devise a scheme where you have a type of 'thread' using simple round-robin scheduling within a single address space.