Hi @nava6neeth,
welcome to the arduino-forum.
Yes sure this is possible.
It is a pretty easy exercise.
As you seem to be a newcomer. As long as you show some own effort in learning and then ask specific questions that are asking
- for learning ressources
- questions that are specific about a part of a program
You will always get helpful answers.
The first step to show this own effort is to read the "how to get the best out of this forum
I'm pretty sure that you agree and will follow the way how to solve your problem mimimum 200 minutes faster.
This requires to invest 20 minutes of your precious time to read how to speedup solving your problems.
Directly after registering you got presented informations how to speed up solving your problem.
You should really read it.
best regards Stefan