You are missing the point. This is not a software question, except for the possible added functionality I had in the coder above, the ability to turn the buzzer on and off by assigning the Vcc a digital I/O pin.
Instead, it is about what we call the two different types of passive buzzer; the truly passive and the driven passive buzzer. The reason is that they will require different wiring diagrams. Most of these kids are nowhere near the point of telling them, "Here is a passive buzzer, the pins are labelled, get it wired up."
I was looking for the correct names of the two types of passive buzzers. What I gathered is that there isn't a real naming convention.
That is fone, I just didn't want to be teaching them something that was wrong, which would have been the case if the two types of passive buzzer had standard, agreed upon, names that differentiate them. That turns out to not be the case.
As such, the material in the course will say:
There are two Common types of passive buzzers.
This is a Passive Buzzer. You will note that only two of the pins are labelled. The pin labelled - will connect to GND and the pin labelled S, or "Signal," will connect to a PWM pin on your Arduino. The centre pin does not need to be connected to anything. This component is simply a stand-alone passive buzzer attached to a small board with a header, to make it easier to use with our breadboard.
This is a Passive Buzzer Module, which you will sometimes hear me call a driven passive buzzer in an attempt to make it clear which of the two devices I am talking about.
The Passive Buzzer Module differs from the Passive Buzzer in that it is a bit louder, and it needs three wires. The one labelled GND will go to GND. The one labelled I/O will still go to a PWM pin. Here is the difference, the pin labeled Vcc needs to go to 3.5Vdc - 5Vdc.
The students will not encounter a bare passive buzzer, one that is not on a board with pre-soldered headers, in this course. I will mention them while talking, but there is little need to spend much time there.
None of this was about active buzzers. It was about me making sure that I was not violating some pre agreed upon naming convention.