Using PololuBuzzer library with Chassis library


I am using the the Romi32U4 and attempting to use the PololuBuzzer library to play a sound in the setup loop. I declared the PololuBuzzer object called buzzer and used the function"v10>>g16>>>c16");. If I include the chassis library from the WPI library and platformIO to Upload the code from VScode, every time I include the buzzer function in the setup loop, I get this error:

PololuBuzzer.cpp.o (symbol from plugin): In function `buzzerSequence':
(.text+0x0): multiple definition of `__vector_41'
Chassis.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2: error: ld returned 1 exit status
*** [.pio/build/a-star32U4/firmware.elf] Error 1

What am I doing wrong? I can’t seem to located where this error is occurring.


Hello, Mohamed.

The wpi-32u4-library readme notes that some files, including the buzzer library, were removed since they conflict with some of the changes in the background (mostly to timers), so I suspect it will not be practical to use the WPI library and our buzzer library in the same programs.

- Patrick

1 Like