Welcome to the forum.
So post the code that didn't work, along with a schematic, pen an paper is fine Fritzing is not.
You might want to look at this [How to get the best from this from this Forum (How to get the best out of this forum) before you proceed any further.