Doubt in project implementation

Search "arduino multi-tasking" on Google, you'll find some interesting tutorials