is it posible to use tools like UML to do this?,
Yes use cases are a useful tool. But UML is all about system design not implementation. In most cases the functions of an Arduino are too restrictive to allow much of projects done here.
The point is that embedded design requires an intimate knowlage of both the hardware and software, a combinations of skills not found in the avrage software person. I have managed both software and hardware engineers and found the software ones are the least flexible and most profligate with both memory and CPU resources. They seem more intent in “doing it correctly “ at the expense of a system that is actually useful.
I had one software engineer design an embedded interface device that was so slow it did not respond instantly to key presses. However it remembered them, stacked them and eventually responded to them. The result was a system where the user pressed something, nothing happened so they pressed it again, then as nothing happened they would press some random buttons and eventually the display would go mad with lots of rapid action. He thought he had done a good job the rest of the team thought it was crap. But he had followed the UML methodology.
Bottom line UML is no substitute for thinking.