Using Mega2560 rev. 3 for a complex automation system, with IndustrialShield

Hi folks !

I have a question, as a beginner&newbie in programming Arduinos.
I'm French but I have a convenient technical-English level, with some basic knowledge in electronics.

I would like to pilot a series of relays (8, maybe 16); and I would like to set some dimensional physical parameters into the memory, via a LCD screen (a 2 lines x 20 characters seems enough), in order to convert the -collected from user- dimensions into a "programmed spreadsheet with corresponding values as delays", then starting the corresponding sequence amid 2, 3 maybe 4 scenarios.

The idea would be to calculate manually the time required in order to reach a physical item from a distance known by the user, then "playing" with the matter with some actuators.

I have seen some products which already contains 6 buttons mounted next to the LCD screens.

How I can implement the "bifurcation" program between the touch selections and the corresponding sequence of relays ?

At a given time, I need to implement a "waiting for user details" prior to adressing the different scenarios. Which kind of function/class/library you should use ?

I will also need to use industrial-based infrared photodetector as sensor of presence/absence of stuff, prior to any movement. I will receive this kind of sensor tomorrow, it seems to be based on a TTL or a RS232 logic, to be confirmed.

Because electric actuators can creates lots of EMI pollution, I have found a "shielded" genuine Arduino Mega 2560 rev. 3, inserted into an industrial, resistant and EMI-compatible box.

This industrial box "M-DUINO" is sold for "rough service" :

I'm currently try to write a correct code with a genuine Arduino Mega ADK card.

Thanks for reading, any advice will be appreciated.

For your project one or more state machines (automatons) are a good solution. Like with every complex project, split it into parts that can be implemented independently. Libraries may be required for all added components, the rest is up to you. Eventually you can use Task Macros for the implementation of the various parts, which simplify the implementation of state machines - once you understand state machines and/or multitasking.

A relevant tutorial for implementing a FSM: