Please help with a project

It’s about learning to program - start with a few basics and then move on. By downloading two sketches and trying to just nail them together you will learn very little.
Look at and play with the example programs .