Personally I am opposed to charging my friends for knitted items such as hats, scarves and even baby blankets. I have had many offer to pay me for them when they admire others that I have made and typically I just ask them to cover the yarn. Likewise if a friend wanted to sit and have me teach them to knit that is the ultimate compliment and I would not charge for that either. It's not that I feel like my time or talent is worthless, it's just that I like doing things for my friends and family. I think we all worry too much about money/compensation and it has ruined many a friendship.
If you are going to charge them for materials I am not sure you should include the cost of your needles as those were purchased for the production of your own scarf and are not purchased specifically and only to make one scarf as a hank of yarn would be.