Does anyone know how to get a 2 wire piezo buzzer or speaker to work with the Cortex? I plugged in a buzzer to the speaker port, but it just emits a noise that doesn’t change with the code. I didn’t want to purchase a $20 unit for 35 groups.
You cannot use the Cortex speaker with the V5 Brain.
If you are using the V4 cortex, then there is a discontinued VEX speaker that will work. But it will nor work with the V5 brain.
If you are using the Cortex, then here is a post that can help: Vex Speaker?
None of these responses are helpful in answering OP’s question.
OP has clearly indicated that they are using the Cortex, with a speaker port, not V5. They would like to use an off-the-shelf buzzer instead of VEX’s speaker module.
@dschaffe This thread should be helpful for you.
In your case, I think the Motor Controller 29 approach described in the first post would make the most sense.
However, if you would like to use the Speaker port as described in the second post, here is the pinout.
Thank you. Yes, I saw that. I didn’t try using the PWM on the motor controller to get it to work. I was trying to use the speaker port. I see that I connected 5v to gnd which is why I heard a tone but couldn’t control the pitch without the 3rd wire going to signal. I would be willing to make something out of old headphone speakers and 3d-print housings to get something comparable.