bricknil.sensor.sound¶
All sound related output devices
Classes¶
DuploSpeaker(name[, port, capabilities]) |
Plays one of five preset sounds through the Duplo built-in speaker |
Members¶
-
class
bricknil.sensor.sound.DuploSpeaker(name, port=None, capabilities=[])[source]¶ Bases:
bricknil.sensor.peripheral.PeripheralPlays one of five preset sounds through the Duplo built-in speaker
See
soundsfor the list.Examples:
@attach(DuploSpeaker, name='speaker') ... await self.speaker.play_sound(DuploSpeaker.sounds.brake)
Notes
Uses Mode 1 to play the presets
-
class
sounds¶ Bases:
enum.EnumAn enumeration.
-
brake= 3¶
-
horn= 9¶
-
station= 5¶
-
steam= 10¶
-
water= 7¶
-
-
class