Hello, I have to do a sound with a buzzer, I use the function tone(), but it doesn't work. I connect the positive through a 220ohms resistor to diferent pins; like 6,7,8,9; and the negative to GND. The buzzer only sounds when I put the positive in the pin 13(and the led is on). I can't understand why it doesn't work, because I see a lot of pages and videos where it works, can you help me? thanks.
Did you assign the pin like this? tone( pin, frequency, duration), I hope that helps.
Show us your sketch and wiring.
I use the sketch in this page http://www.criandorobocomarduino.com/2013/09/como-usar-o-buzzer-som-no-arduino.html but it isn't the only one, regretably nothing work; you can see the circuit's photo here http://1drv.ms/QNNCmv
I assume you set pinMode(6,OUTPUT); when you use pin 6 etc.
Also:
Some buzzers are self contained, that is they will only produce a resonant tone o/p.