Changes between Version 1 and Version 2 of mycroft_mark-2
- Timestamp:
- 04/12/20 08:41:50 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
mycroft_mark-2
v1 v2 16 16 The things that I had to do: 17 17 ==== Install the library ==== 18 - while in (.venv) 19 20 {{{ 21 pip3 install RPI.GPIO 22 pip3 install adafruit-blinka 23 }}} 18 while in (.venv) 19 * pip3 install RPI.GPIO 20 * pip3 install adafruit-blinka 24 21 ==== Enable I2C === 25 22 I2C is not enabled by default so run and enable I2C in the Interfacing Options 26 23 ==== Python script ==== 27 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 conten 24 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 25 * nano ~/bin/ada_volume.py 28 26 {{{ 29 27 import board … … 34 32 amp.volume = 30 35 33 }}} 34 ==== Start using systems ==== 35 Place a service file in the user directory: 36 * nano ~/.config/systemd/user/myadavolume.service 37 with the content 38 {{{ 39 [Unit] 40 Description=set adafruit volume 41 After=network.target 36 42 43 [Service] 44 Type=simple 45 ExecStart=/home/pi/mycroft-core/.venv/bin/python /home/pi/bin/ada_volume.py 37 46 47 [Install] 48 WantedBy=default.target 49 }}} 50 Enable and start it: 51 * systemctl --user daemon-reload 52 * systemctl --user enable myadavolume 53 * systemctl --user start myadavolume