How to use the Buzzer in M5Stick



  • I tried to use the buzzer on M5Stick.
    In UIFlow I used Advanced > PIN > digital write pin 26 to 1, but you don't hear the buzzer. You can feel that M5Stick "tries" to do it.

    So what did I wrong? I expected to have a buffer as in a mobile phone to at least feel if vibrating or to hear a beep?



  • @an-erd said in How to use the Buzzer in M5Stick:

    I tried to use the buzzer on M5Stick.
    In UIFlow I used Advanced > PIN > digital write pin 26 to 1, but you don't hear the buzzer. You can feel that M5Stick "tries" to do it.

    So what did I wrong? I expected to have a buffer as in a mobile phone to at least feel if vibrating or to hear a beep?

    You don't do that in UIflow, you use speaker.tone(1600, 200) or speaker.sing(220, 1)

    from m5stack import *
    from m5ui import *
    
    clear_bg(0x111111)
    
    
    
    
    
    speaker.tone(1600, 200)
    speaker.sing(220, 1)
    

    or the Speaker beep and play tone blocks in the blocky mode.


Log in to reply
 

Looks like your connection to M5Stack Community was lost, please wait while we try to reconnect.