Version 2 (modified by 5 years ago) (diff) | ,
---|
Mycroft Mark II
body / case
The original mark2 body at https://github.com/MycroftAI/hardware-mycroft-mark-II-rpi was not printable on my FDM printer. So I used this: https://community.mycroft.ai/t/simplified-mark-ii-body-for-fdm-printing/8248/12 or https://github.com/guhl/hardware-mycroft-mark-II-rpi
Software basis
I used the picroft image Picroft_Buster-Keaton_2020-01-10.img as the software basis
Audio
I had two problems related to audio.
First the volume of the Adafruit MAX9744 Amplifier was very high and resulted in a general cracking and static noise when switched on.
Adafruit Volume control
I am controlling the volume of the MAX9744 using the CircuitPython Libraries (see https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi ). The things that I had to do:
Install the library
while in (.venv)
- pip3 install RPI.GPIO
- pip3 install adafruit-blinka
Enable I2C ===
I2C is not enabled by default so run and enable I2C in the Interfacing Options
Python script
Use this script to set the initial volume to about the half (the range is 0 to 63). Create ~/bin/ada_volume.py with the following content
- nano ~/bin/ada_volume.py
import board import busio import adafruit_max9744 i2c = busio.I2C(board.SCL, board.SDA) amp = adafruit_max9744.MAX9744(i2c) amp.volume = 30
Start using systems
Place a service file in the user directory:
- nano ~/.config/systemd/user/myadavolume.service
with the content
[Unit] Description=set adafruit volume After=network.target [Service] Type=simple ExecStart=/home/pi/mycroft-core/.venv/bin/python /home/pi/bin/ada_volume.py [Install] WantedBy=default.target
Enable and start it:
- systemctl --user daemon-reload
- systemctl --user enable myadavolume
- systemctl --user start myadavolume