Need help on a school project

Welcome to the Forum! Read the forum guidelines to see how to properly ask a question and some good information on making a good post.
You will get faster and better help if you post all your code as requested by the forum guidelines. Also please describe what the hardware do you use.
Photos that clearly show your wiring can also be very helpful.