Skip to content
Manuel83 edited this page Jun 18, 2017 · 1 revision

Example Code for Custom Buzzer

from modules import cbpi

class MyBuzzer(object):
    def beep(self):
        print "#########################  PLAY MY SOUND"

@cbpi.initalizer(order=-1)
def init(cbpi):
    print "############## INIT BUZZER"
    cbpi.buzzer = MyBuzzer()
    print "INIT BUZZER"
Clone this wiki locally