I have intermediate level of understanding on how TCP and serial works, I've also been able to develop system that uses
- 1 TCP client and 1 Serial
- 2 Serials
- 1 TCP Server
- 1 TCP client
My problem is that whenever I am creating a new project there are different needs, sometimes it's 1 TCP client and 1 Serial, sometimes it is 5 serials.
Right now I am thinking whether preparing 5 serial, 5 TCP client and 1 Server that can be enabled or disabled depending on my projects need is reliable? Preparing 5 seems too much, but I want to prepare it so whenever there is a need I can quickly activate them.
Some suggested that by using class I can do the same. I never use classes, I can study it but the question is do I really need it or is there a best way to do this?