I'm not allowed to go to my friend's house anymore because I gave his brother a cough pill! What should I do?

When I was with him, I took a cough tablet because I recently had a cold. His 8-year-old brother saw it and wanted one too. I gave him one. A few minutes later, his parents came over and complained that I was stuffing my little brother full of chemicals and putting him in danger. I…