mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-09-19 15:59:07 +02:00
Created Custom Buzzer (markdown)
+14
@@ -0,0 +1,14 @@
|
|||||||
|
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"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user