I won't spend a lot of time trying to decide if you actually cheated. If I think cheating might have occurred, I'll just give any evidence to the University's Academic Misconduct Committee and let them decide.
Discussion of assignments and labs with your classmates is acceptable, but do your own work. Near duplicate assignments will be considered cheating unless the assignment was restrictive enough to justify such similarities in independent work.
This page gives you good guidelines on how to avoid academic misconduct. Read it and abide by those guidelines.