Buzzer Node
The buzzer is a very simple output device, either on or off. Because of this, the BuzzerNode is a very simple implementation and useful for putting in place your first I2C device controller:
buzzernode.py
loading...
This node is based on the I2CNode class, inheriting the lower level I2C methods. During startup the node subscribes to the buzzer-node-sound event. This event has a single parameter, duration. When fired, this node writes to the buzzer's I2C register, turning the buzzer on. After a delay, the buzzer is turned off.
On startup, the buzzer is sounded for 0.1 seconds. Because this can get annoying, this is under flag control set at environment level.