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.Peripheral
Plays one of five preset sounds through the Duplo built-in speaker
See
sounds
for 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.Enum
An enumeration.
-
brake
= 3¶
-
horn
= 9¶
-
station
= 5¶
-
steam
= 10¶
-
water
= 7¶
-
-
class