This is the documentation for the latest development branch of MicroPython and may refer to features that are not available in released versions.

If you are looking for the documentation for a specific release, use the drop-down menu on the left and select the desired version.

thingz.thingz_sound

Thingz Sound

class thingz.thingz_sound.Sound

Output sound using Galaxia’s Jack connector

play(on: bool, freq: int) None
Parameters:
  • on (bool) – Enable frequency generation onto the jack

  • freq (int) – The frequency to generate in Hz

set_frequency(freq: int) None
Parameters:

freq (int) – The frequency to generate in Hz

set_volume(volume: int) None

Set the volume of the sound

Parameters:

volume (int) – The volume of the sound between 0 and 100

play_sample(filename: str) None

Play a sound sample. Sample must be in wav format

Parameters:

filename (str) – The path to file