Introduction

Documentation Status Discord Build Status

CircuitPython module for the MAX9744 20W class D amplifier.

Dependencies

This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle.

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:

pip3 install adafruit-circuitpython-max9744

To install system-wide (this may be required in some cases):

sudo pip3 install adafruit-circuitpython-max9744

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install adafruit-circuitpython-max9744

Usage Example

See examples/max9744_simpletest.py for a demo of the usage.

Contributing

Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.

Documentation

For information on building library documentation, please check out this guide.

Table of Contents

Simple test

Ensure your device works with this simple test.

examples/mas9744_simpletest.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Simple demo of the MAX9744 20W class D amplifier I2C control.
# This show how to set the volume of the amplifier.
# Author: Tony DiCola
import board
import busio

import adafruit_max9744


# Initialize I2C bus.
i2c = busio.I2C(board.SCL, board.SDA)

# Initialize amplifier.
amp = adafruit_max9744.MAX9744(i2c)
# Optionally you can specify a different addres if you override the AD1, AD2
# pins to change the address.
#amp = adafruit_max9744.MAX9744(i2c, address=0x49)

# Setting the volume is as easy as writing to the volume property (note
# you cannot read the property so keep track of volume in your own code if
# you need it).
amp.volume = 31  # Volume is a value from 0 to 63 where 0 is muted/off and
                 # 63 is maximum volume.

# In addition you can call a function to instruct the amp to move up or down
# a single volume level.  This is handy if you just have up/down buttons in
# your project for volume:
amp.volume_up()    # Increase volume by one level.

amp.volume_down()  # Decrease volume by one level.

adafruit_max9744

CircuitPython module for the MAX9744 20W class D amplifier. See examples/simpletest.py for a demo of the usage.

  • Author(s): Tony DiCola

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_max9744.MAX9744(i2c, *, address=75)[source]

MAX9744 20 watt class D amplifier.

Parameters:
  • i2c – The I2C bus for the device.
  • address – (Optional) The address of the device if it has been overridden from the default with the AD1, AD2 pins.
volume_down()[source]

Decrease the volume by one level.

volume_up()[source]

Increase the volume by one level.

Indices and tables