m3PI Buzzers


I have the m3PI robot and I am working to learn to program it.

it looks like the pololu serial slave program has functions to operate the buzzer (do_play) but the m3pi library on the mbed website is missing a buzzer function.

Does this mean that if I want to use the buzzer on the m3PI, i need to put my own function in the ‘master’ m3pi library to call the ‘slave’ buzzer.

Also am i correct that the m3pi loses the use of buttons A, B, and C? neither the serial slave program nor mbed libraries mention the buttons.

This was my solution to the buzzers: (I tested it and it worked)

Add this to the m3pi library CPP file in mbed

int m3pi::playBuzzer (char* tune) {
    for (int i = 0 ; i < strlen(tune) ; i++) {

and this to the .h file in mbed

int playBuzzer(char* tune);


Thank you for sharing your buzzer code for the m3pi! I am sure other m3pi user’s will find it helpful for their own projects.