Hello
I'm new to programming and the Arduino world.
I already learned the basic functions, but the more I learn, more it sems to me that one Arduino won't fulfill the job I need it to do on my project.
For exemple, I want to make a Arduino to monitor some sensors, send it to a ethernet server (which will be hosted in a RaspberryPi). But I also want it to control some outputs (lights, motors, etc), via the information of the sensors plus manual activation from a device connected to the network.
My question is, how can I make the Arduino put a 1 on port X1 if it receives order Y1 from the RaspPi or do the same if it detects that its below 10 degrees from a temp sensor; and in the same time, be able to receive order Y2 and activate port X2, order Y3 port Y3, etc. (X1, Y1, X2... are exemples)
By my current understandment of programming, that would require several "if"s, one for each order. But afaik the Arduino can only process one thing at a time, if it's wating for the
if (Y1 == high) {digitalWrite (X1,HIGH)};
to complete, even if the requirements for the next if are true, it won't do anything.
Of course there may be something I didn't learn already. But I need to know this now to take it into account as I have ~5 months to finish the programming of the project. So is there something like running multiple programs (like different voids) at the same time? Another solution that I was thinking is making a time limit in each "if", so it can cycle through all of them until it finds one that meets the activation criteria, execute it and them keep moving.
Sorry for the long text, I'm trying to be as clear as possible. Also sorry if I'm missing anything essential and being a complete noob
Greetings from Brazil