Draw diagrams -
UML seems to be the thing to use nowadays.
There are some good tools (and some free ones) which help with the maintenance. Though if you're only planning a few diagrams, paper and/or a whiteboard with post-it notes makes a great substitute.
Although UML has 13 different diagram types, some of them are rather specialised. Don't feel too weird if you can't think of a good reason to use them. UML aims to span from designing the garden shed to designing a skyscraper. There's just some stuff you don't need at the lower end of the scale.
Roughly speaking, you start with a single box representing your entire system, and you surround it with all the interactions with the outside world. Say, users, sensors, display devices, remote machines etc etc.
You then break your system into between 4 and 6 sub-components representing the "big" ideas within your program. These will interact with the outside world (see your first diagram) and will create new interactions between the entities you created.
Keep doing that until you start to create very small components which seem trivial to implement in code.
Oh, and before you rush to start coding, walk the diagrams through with someone (anyone) just to make sure it all hangs together properly. A quick diagram fiddle may represent a saving of several weeks of coding effort.