That sounds like an interesting project that could be a lot of fun! However, I am not clairvoyant. Please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it following forum guidelines along with an explanation of what’s not working properly.
Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working.
Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential.
I moved your topic to a more appropriate forum category @r3bhjkwdnwkhn .
In the future, please take the time to pick the forum category that best suits the subject of your question. There is an "About the _____ category" topic at the top of each category that explains its purpose.
Most people would use the serial monitor to display messages that they add to their code to show the logic steps as they are taken or what is being attempted by that particular bit of code. Why don't you try doing that and see if that helps you discover the problem.