How would any of us be able to send you code without you being able to tell us what you want it to do? The project must be defined first!
The first step in any automation project is to define WHAT you want it to do. Make a flow chart or a process narrative or whatever it takes to define your project. Show every step, plus every transition between steps. How do you detect faults? How do you reset them? How does the operator start and stop the system? etc. etc. etc. Do this BEFORE you ever start trying to write code.
Then define your I/O requirements. What devices do you need to do what you need to do?
THEN you ~might~ have enough information to start writing code.
The first step in any automation project is to define WHAT you want it to do. Make a flow chart or a process narrative or whatever it takes to define your project. Show every step, plus every transition between steps. How do you detect faults? How do you reset them? How does the operator start and stop the system? etc. etc. etc. Do this BEFORE you ever start trying to write code.
Then define your I/O requirements. What devices do you need to do what you need to do?
THEN you ~might~ have enough information to start writing code.